How to set permissions with chmod

Permissions are specified in octal using a three digit code. The first digit determines the owner permission, the second digit the group permission and the third digit everyone else's permission. In any of these, set 4 for read only, 6 for read and write or 7 for read, write and execute.

Here's a trick to set execute permission on directories only:

chmod -R 604 *
chmod -R u+X *
chmod -R o+X *

Discussion

Enter your comment (wiki syntax is allowed):

Subscribe to the RSS feed for Andy's Debian HOWTOs

Article from Andy's Debian HOWTOs (http://www.besy.co.uk/debian/debian)

 
debian/how_to_set_file_permissions_with_chmod.txt · Last modified: 2008/08/01 23:56 (external edit) · [Old revisions]
Recent changes RSS feed Powered by Debian Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki