Chmod permissions (flags) explained: 600, 0600, 700, 777, 100 etc..

By neokrates, written on April 25, 2010

article

View Counter:
  • 13,698 views
Rate it
  • 1 Star2 Stars3 Stars4 Stars5 Stars (4 votes, average: 4.25 out of 5)
    Loading ... Loading ...
Ad
Poll
  • Your skill as shell programmer is?

    View Results

    Loading ... Loading ...
Feeds:
  • bodytext bodytext bodytext
Most popular search terms:

Want to know what the numbers in chmod mean? Using flags is an easy and short form to set user permissions. This article puts it SIMPLE, if you want to learn the theory, also visit the links in the end.

There are four OCTAL (0..7) digits, which control the file permissions. But often, only three are used. If you use 600 it equals 0600. The missing digit is appended at the beginning of the number.

Each of three digits described permissions. Position in the number defines to which group permissions do apply!

Permissions:
1 – can execute
2 – can write
4 – can read

The octal number is the sum of those free permissions, i.e.
3 (1+2) – can execute and write
6 (2+4) – can write and read

Position of the digit in value:
1 – what owner can
2 – what users in the file group(class) can
3 – what users not in the file group(class) can

Examples:
chmod 600 file – owner can read and write
chmod 700 file – owner can read, write and execute
chmod 666 file – all can read and write
chmod 777 file – all can read, write and execute

Links:
1) Wikipedia explains that in greater detail: http://en.wikipedia.org/wiki/Filesystem_permissions
2) Main page for chmod: http://linux.die.net/man/1/chmod

 


TAGS

RELATED
Pages
Posts

SOCIAL
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • BlinkList
  • Blogosphere News
  • E-mail this story to a friend!
  • Furl
  • LinkArena
  • Live
  • MisterWong
  • Print this article!
  • StumbleUpon
  • Technorati
  • Webnews.de
  • YahooMyWeb

INCOMING SEARCH TERMS


12 Responses to “Chmod permissions (flags) explained: 600, 0600, 700, 777, 100 etc..”

  1. David Zhang says:

    This is a great post.  It’s just what I needed – something clean and simple, right to the point.
    I really appreciate your doing this!  Thanks!

    Well-loved. Like or Dislike: Thumb up 9 Thumb down 3

  2. Hidden due to low comment rating. Click here to see.

    Poorly-rated. Like or Dislike: Thumb up 1 Thumb down 5

  3. rasel says:

    wow i was searching them for a long time. you just answer me.

    Like or Dislike: Thumb up 2 Thumb down 2

  4. [...] my key I would have thought permissions would be set ok from the start but I anyway tried doing chmod 644 on the key [...]

    Like or Dislike: Thumb up 0 Thumb down 1

  5. Samuel says:

    Very clear and right to the point article. Thank you so much.

    Like or Dislike: Thumb up 1 Thumb down 2

  6. Ben says:

    Short and sweet; thank you!

    Like or Dislike: Thumb up 2 Thumb down 1

  7. Daniel says:

    Thank’s a lot neokrates, it solves my problem with file transferts
    Cheers,
     
    Daniel.

    Like or Dislike: Thumb up 2 Thumb down 1

  8. neokrates says:

    happy to hear!

    Like or Dislike: Thumb up 1 Thumb down 1

  9. [...] permissions and ownership of /etc/firewall-openvpn-rules.sh. First we’ll change the mode to 700 (owner can read, write, and execute). Then, we’ll change the owner to root, in which [...]

    Like or Dislike: Thumb up 0 Thumb down 0

  10. [...] the permissions and ownership of /etc/firewall-openvpn-rules.sh. First we’ll change the mode to 700 (owner can read, write, and execute). Then, we’ll change the owner to root, in which “root” [...]

    Like or Dislike: Thumb up 0 Thumb down 0

  11. [...] des eigenen Web-Verzeichnisses an. Machen Sie davon gebrauch und versehen Sie Datei mit den Rechten 600. wp-config.php ein Verzeichnis über [...]

    Like or Dislike: Thumb up 0 Thumb down 0

Leave a Reply