-
☆ A M B ☆
- 77 Posts
I've been having this strange permissions issue with softlayer - I love their virtual cloud server solution. Modx runs great on it. BUT the issue is I never get a clean install. I'm fighting a ton of permission issues each time... not just the normal make sure your export and package folders have permission, but widespread, any folder created by modx becomes totally unwritable by cpanel or FTP. I can't delete my cache folder for instance or any of its contents. Even the cPanel file manager can't do it.
Ideas?
-
☆ A M B ☆
- 77 Posts
The issue seems to be that the cache is getting generated as nobody:nobody instead of the account holder... but I don't know how to fix that this is an out of the box cPanel install.
-
☆ A M B ☆
- 77 Posts
The issue seems to be that the cache is getting generated as nobody:nobody instead of the account holder... but I don't know how to fix that this is an out of the box cPanel install.
-
☆ A M B ☆
- 24,524 Posts
That information is still useful.
Normally a .php script is run by the web server user (nobody, group nobody in your case). So any files written by that script will be owned by that user.
suPHP and PHPSuexec as well as running PHP as a CGI/FastCGI application with suexec will change the user to the owner of the .php file (your user). This way any files the script creates will be owned by your user.
This is great for shared hosting, where you need to take some steps to protect one webspace from another, and really shouldn't be using world-writable permissions on your files (so that files written by 'nobody' can be managed by anybody else). In this case, permissions of 755 and 644 are appropriate - and in many cases 777 or 666 will cause a server 500 error.
However, if you have a dedicated server or a VPS, it is better to use 777 and 666 permissions for folders and files and leave the usernames alone. You can use System Settings new_file_permissions and new_folder_permissions to set these from the default 755 and 644.
-
☆ A M B ☆
- 77 Posts
Thanks for that... I am using centos - for some reason when I try to run with PHPSuexec and FastCGI I get an internal server error... Ill find the permissions in the db and see if it works thanks!
-
☆ A M B ☆
- 24,524 Posts
You won't find them in the db. The default (755 and 644) are hard-coded as default values in all of the MODX code. The System Settings don't exist at all unless you have modified them during setup, which of course doesn't happen when you use one of those automated installation scripts.
-
☆ A M B ☆
- 77 Posts
Yea... I discovered that getting ready to reinstall now. Thanks for the help! FINGERS CROSSED
-
☆ A M B ☆
- 77 Posts
Giving up on this for the night. Ive run the server using suPHP, fCGI, CGI and PUPSuexec on and off and I get the same results. I've reinstalled modx from scratch at least 10 times, including editing the permissions that you mentioned above and the cache is still being written as nobody:nobody.
-
☆ A M B ☆
- 24,524 Posts
If the permissions are 777-666 then the owner doesn't matter. All files written by MODX will still be owned by 'nobody', but with those permissions anybody can read/write them, including your FTP/Cpanel user.