I have a dedicated server with Hostgator and I have a few sites hosted on and one site in question always has file ownership permission issues. It's a joomla site and the only time this problem occurs is when a plugin or module is installed from the admin panel of the script. What happens is I am unable to edit files from that plugin, overwrite, or delete it. I try to change the permissions and it's denied on the folder and or file. Hostgator helped me in the past by fixing the permissions, but it's always a one time solution that needs to be redone again soon as the above is repeated. The problem with there method of help is not everyone on staff there understands how to solve the problem but less alone it's always temporary. My question is, is there a permanent solution to fixing this problem? The words I hear is "group ownership permissions" that are at fault. Thanks for any help as this drives me insane to manage for this site all the time.
Check if your server is suphp enabled ? suphp should help with the ownership and permissions issue once enabled. It has helped our clients in the past for the same scenario.
Ok, it's enabled. But is there some way to mass change the group ownership permissions? Right now they all say ownership for the folder is 99/99. Which I think they should be 501/501 based on other folder settings. I'm a newbie level at managing a dedicated.
On a suphp server it should be under the user's ownership. To mass update the ownership use command as below. The above command will mass update the ownership to user's. Replace cPanel-user with actual username. Are you using any control panel ?
Hello there, The command must be issued via command line, not through a control panel. You need to log into your server as the root user for this to work: chown -R cPanel-user.cPanel-user /home/cPanel-user/public_html find /home/cPanel-user/public_html -type d -perm 0777 -exec chmod 755 {} \; find /home/cPanel-user/public_html -type f -perm 0666 -exec chmod 644 {} \; Code (markup): I threw in a couple of additional commands, as running SuPHP with folder and directory permissions too lean, will flag a 500 (internal server) error. Of course, be sure to replace cPanel-user with the proper username for the account. Regards, Chris
We provide suPHP on our hosting plans, so scripts are run by file owner that has full permissions. This solves a lot of hassle as no extra file/folder permissions configuration is required for scripts.
Login to server via SSH with root details. Download putty and connect using putty. Thanks Chris for the additional commands as well. It will help China J.
Ok, that changed the file/folder permissions only. It did not change the owner group permissions. I'm looking for the long term solution. Hostgator suggested I run a cron but I said I shouldn't have to run a cron to keep the perms right. the ownerships that are affected show 99/99 when they should be 501/501. If you view in Filezilla you will understand what I mean.
Wow this server admin stuff is a learning curve. I want to thank everyone for their help on this issue. I have a ticket also in with Hostgator Admins to see whats up with the server just incase there is something wrong with setup.