Tim Romero Posted January 14, 2010 Share Posted January 14, 2010 I switched hosts, and Im trying to secure my site. All my folders are set to 2775. I'm not too sure what these numbers mean. I hope they are set right Link to comment Share on other sites More sharing options...
chadcloman Posted January 23, 2010 Share Posted January 23, 2010 The short answer to your question is that you should probably have 2755 as the folder permissions. "2775" is an octal number that defines the file permissions. The leftmost digit (the "2") is optional and defaults to zero if not specified. The digits in the "775" portion define the permissions for the file owner, file group, and everyone, from left to right respectively. Valid numbers are 0-7, with 4 indicating read access, 2 indicating write access, and 1 indicating execute access (for directories execute permission also allows you to traverse the directory tree). If a file has multiple permissions, you add the values together. Thus a "7" means 4+2+1 which is read, write, and execute permission, while a "5" means 4+1 which is read and execute permission. More information about these permissions can be found here. The first digit of a 4-character permission (in this case, the "2") specifies the setuid mode (=4), the setgid mode (=2), and the sticky mode (=1). These values are added together in a manner identical to the read/write/executable permissions above. More information is here. It should be noted that the setgid mode and the sticky mode have special meanings for directories. Thus a permission of "2755" for a directory means that everyone has read and execute permission, while the file owner and members of the file's group additionally have write permission. And any files or subdirectories created in that directory will inherit the parent directory's group id. Check out Chad's News. Link to comment Share on other sites More sharing options...
Guest Posted January 23, 2010 Share Posted January 23, 2010 Tim, In most cases folders are set to 0755 and files 0644. The configure.php files I usually try to set to 0444. Chris Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.