File Permissions on Linux

I add this to my blog as these I found handy on file permission. Simply because I cannot remember it from the grey matter call my brain.

 

CHMOD

Here is a list of some common settings, numerical values and their meanings:

Setting Numerical Meaning
-rw——- (600) Only the owner has read and write permissions.
-rw-r–r– (644) Only the owner has read and write permissions; the group and others have read only.
-rwx—— (700) Only the owner has read, write, and execute permissions.
-rwxr-xr-x (755) The owner has read, write, and execute permissions; the group and others have only read and execute.
-rwx–x–x (711) The owner has read, write, and execute permissions; the group and others have only execute.
-rw-rw-rw- (666) Everyone can read and write to the file. (Be careful with these permissions.)
-rwxrwxrwx (777) Everyone can read, write, and execute. (Again, this permissions setting can be hazardous.)

Here are some common settings for directories:

Setting Numerical Meaning
drwx—— (700) Only the user can read, write in this directory.
drwxr-xr-x (755) Everyone can read the directory; users and groups have read and execute permissions.

Comments

comments

Privacy Preference Center