cache folders get set with wrong user / group
Warning: file_put_contents() [function.file-put-contents]: Unable to access /f5/nerdess/public/files/cache/pages/!/1/!1.cache in /f5/nerdess/public/updates/concrete22.214.171.124_updater/concrete/core/libraries/page_cache/types/file.php on line 67
Warning: file_put_contents(/f5/nerdess/public/files/cache/pages/!/1/!1.cache) [function.file-put-contents]: failed to open stream: No such file or directory in /f5/nerdess/public/updates/concrete126.96.36.199_updater/concrete/core/libraries/page_cache/types/file.php on line 67
when i look at the folders it is clear why: for some strange reason the affected folders belong to the user "web" but need the user "193287".
even after i delete everything in files/cache the /pages folder gets created by the user "web".
how can i force that instead of "web" the user and group "193287" get used? thx!
I doubt that the user permissions issue has anything to do with concrete5 but I'm not quite sure if you're able to upload a file.
What's different in that version (comparing to your pre-upgrade version) is that the "compiled" assets are cached into that folder when they are requested the first time. So it makes sense that this issue did not appear before your upgrade but I'm just wondering whether normal file uploads work because that wouldn't make any sense to me that you don't get the same error there.
Anyhow, you'll probably need to do one of these:
- If the target user (193287) is a must for the file ownerships, you should use either suEXEC or suPHP module and set it up to do that.
- If it's not a must, then add the "web" user to the "193287" group and then provide those the whole /files folder group-level write access (assuming this is a system that you own and manage and no one else has access there)
Please note the second one can be highly risky option on shared environments because it means that anyone who can run their code on that server would get write access to all of your files in that folder.
Antti / Mainio
turns out that your assumption was right: i cannot upload files through the file manager either, i get this popup instead:
"Unable to copy file to storage directory. Please check permissions on your upload directory and ensure they can be written to by your web server."
unfortunately i cannot try to implement any of your solutions because i don't have root access to the webserver and can only do some basic ssh stuff there :(
so instead of "Apache 2.2, PHP 5.3 Fast, CGI"
i now use the recommended "Apache 2.4, PHP 5.4, CGI (Stochastic)"
i realized that the "Fast" mode was no good when reading this bit of their FAQ'shttp://faq.nearlyfreespeech.net/section/programming/phpwritingfiles...
all quite bizarre and tbh i have no real clue what the difference between those two server types is but all works fine now.
still however cannot upload files using the file manager so have to treat this as a separate problem :)