configuration - PHP will not run unless 644?


I am sub-contracted through a large data center that uses shared servers and cPanel. I create websites for their hosting clients.

Their configuration is off. When I upload files to the server through cPanel directories are given 775 permissions and PHP files are given 664 permissions.

Every time I upload an application I have to recursively change the file permissions of the PHP files from 664 to 644 or no PHP will execute and results in a 500 error.

This is particularly painful because as a sub-contractor I have to ask for temporary shell access every time I need to do this.

Obviously the problem is that the PHP files are being executed by the group, and 664 permissions do not allow execution.

I'm not too familiar with cPanel, and I'm unsure what is causing this problem. Is this a problem with the server, or with cPanel? How can I change the default upload permissions for cPanel?




for cpanel, both owner and group have to be the username of the cPanel user.

In a typical cPanel configuration, the root directory for the accounts is home. Depending on the size of the server, it could be home2/ or home3, etc.

chown -R username:username /home/username/public_html/path_to_files

People are also looking for solutions to the problem: php - DBO Select where equals and like


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.