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

By neokrates, written on April 25, 2010

article

  • Join date: 11-30-99
  • Posts: 224
View Counter:
  • 87,658 views
Rate it
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

Be Sociable, Share!
 


TAGS

RELATED
Pages
Posts

SOCIAL
Be Sociable, Share!

INCOMING SEARCH TERMS


19 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!

    Like or Dislike: Thumb up 0 Thumb down 0

  2. rasel says:

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

    Like or Dislike: Thumb up 0 Thumb down 0

  3. […] 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 0

  4. Samuel says:

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

    Like or Dislike: Thumb up 0 Thumb down 0

  5. Ben says:

    Short and sweet; thank you!

    Like or Dislike: Thumb up 0 Thumb down 0

  6. Daniel says:

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

    Like or Dislike: Thumb up 0 Thumb down 0

  7. happy to hear!

    Like or Dislike: Thumb up 0 Thumb down 0

  8. […] 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

  9. […] 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

  10. […] 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

  11. […] Here are some things about chmod. […]

    Like or Dislike: Thumb up 0 Thumb down 0

  12. […] ????root????????????????????????Linux??????????3??????700??”???????????”? […]

    Like or Dislike: Thumb up 0 Thumb down 0

  13. […] ????????700 (???????????)? […]

    Like or Dislike: Thumb up 0 Thumb down 0

  14. […] tukarkan permission kepada file mac_accept tadi dengan menaip chmod 600 /etc/hostapd/mac_accept dan kemudian taip reboot untuk restart semula […]

    Like or Dislike: Thumb up 0 Thumb down 0

  15. teranine says:

    Don’t forget 755 for rwxr-xr-x access to files and directories

    Like or Dislike: Thumb up 0 Thumb down 0

  16. swamy says:

    nice post .it helped me to understand  about the mode_t than you very much neokrates

    Like or Dislike: Thumb up 0 Thumb down 0

  17. […] then give it root privileges. If you remember from Part One, permissions in Linux are governed by different three-digit numbers. Seven hundred means “owner can read, write, and […]

    Like or Dislike: Thumb up 0 Thumb down 0

Leave a Reply