Unix File Permissions

Article by on April 1, 2012, last modified on May 6, 2013

For future reference:

7 rwx
6 rw-
5 r-x
4 r--
3 -wx
2 -w-
1 --x

I will add more info in the future about chmod. (Really, I should move this to be an article.)

Read about sticky bits:



Extended Attributes

You can tell if a file has an extended attribute by using the -l flag on ls, such as:

$ ls -l /usr/lib/python2.5/site-packages/include_server
-rw-r--r--@ 1 root wheel 2.6K Jun 6 09:38 roman.py

To see what the attributes are, use the xattr command as follows:

$ xattr /usr/lib/python2.5/site-packages/include_server/roman.py 

To remove an attribute, use the -d flag and specify the attribute to remove:

$ sudo xattr -d com.apple.quarantine /usr/lib/python2.5/site-packages/include_server/roman.py




Further Reading

  • http://linuxfocus.berlios.de/English/January1999/article77.html
Older Articles ยป