File permissions wont stay when set by cPanel
Hi,
I noticed today after getting some new errors (just updated cpanel yesterday) that some of my files in my domain that require to be 777 were set to 644. So i changed them via cpanel to 0777. I still got the errors as before..
So then i noticed that the files had reverted back to 0644 when the system rewote the cache files. Then i changed them to 0777 using filezilla and they stayed the same, but then when the system rewrote the cache file again it wrote it back as 0644.
I use the same owner of the files on both filezilla and cpanel so whats the difference.
Why is the system writing files 0644 autmatically? And why cant it see that i want these files at 0777 permanently?
Thanks :)
-
Check to see if you have Tweak Settings > Security > File protect switched on. [quote]This option enables the EasyApache FileProtect module, which improves the security of each user"s public_html directory
My understanding is that this setting (ON by default) will reset all the permissions in the public_html folder each time upcp runs. You might want to experiment with switching this OFF, but I would strongly advise against setting any 0777 file permissions in the first place.0 -
hi thanks i will check it out.. i know that the owner is root and that i am running php as cpanel username and that i am running fastcgi if all that matters. The script requires that cache files be 0777 so thats the only reason why. I really wish i could get off of fastcgi i want for apache to handle my php files as im used to that but i remember when i set this up that there were so many options and i remember that i got so lost in all of it i just gave up and set it to fastcgi just to get the server up. I currently have this account set up as a reseller but i really dont need that on this account as im on the main shared ip so ill take the reseller off. That will at least eliminate the confusion of having whm on the domain level. Then i can controll it from root whm. 0 -
I changed that setting to NO and still the same :( 0 -
Removing fastgci of course broke the website. Is there a guide how to do this correct and get back to basics (apache php) UPDATE: I was able to get the php running as cpanel owner by uninstalling fastcgi and then leaving cgi as the handler in easyapache. I checked it this way "; $userinfo = posix_getuid(); $finaluserinfo = posix_getpwuid($userinfo); print_r($finaluserinfo); exit;
now both php user and file owner are the cpanel username which is good.. but phpinfo still says fastcgi, what the heck? And the same problem with permissions.0 -
Hello, Do you have any cron jobs installed as part of that script (or elsewhere) that could be automatically altering the permissions of the files in that directory? Thank you. 0 -
that is very possible, i will check that out... thanks :) 0
Please sign in to leave a comment.
Comments
6 comments