Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Is CHMOD 2775 Secure?


Tim Romero

Recommended Posts

  • 2 weeks later...

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...