Forum Moderators: phranque

Message Too Old, No Replies

What should home directories by chmodded to?

         

Crump

3:24 pm on Jul 21, 2010 (gmt 0)

10+ Year Member



When I make a new home directory it defaults to rights of 700. I intend to have web accessible files in this dir (basically a website). Shouldn't it have more rights?

Crump

4:00 pm on Jul 22, 2010 (gmt 0)

10+ Year Member



anyone?

lammert

4:07 pm on Jul 22, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi Crump,

It all depends on the user account you are using to upload the files, the user account used to execute the Apache server and the specific rights needed by the scripts you are running.

In many situations it is good to use a different account for execution of Apache than the owner of the script directories and files. The user under which Apache runs should only have read and execute rights in the directory, no write rights. Having rights 755 should be fine. The reason is that if you are attacked by a hacker it will be difficult to change your scripts, because the hacker won't have modify rights.

Some sites, especially those which run a CMS system need write access to the script directories to make configuration changes. Therefore 755 might not be the right setting in that case.