UNIX file permission examples


In the examples below, "you" means whatever class of users the specified three permission bits refer to, which could be you as the owner of the file, you as a member of the group which owns the file, or you as anyone else not in the previous two categories.

rwx (octal 7) lets you do anything

r-x (octal 5) lets you read or execute a file, or list or search a directory

--x (octal 1) lets you execute (but not read) a file, or search a directory for a specified file, but not get a complete listing of directory contents

r-- (octal 4) lets you read a file, but not modify it

-w- (octal 2) lets you write into a file, but not read it

r--, -w-, rw- are pretty much useless for directories

Next ->


Steve VanDevender
Last modified: Wed Jun 27 14:19:58 PDT 2007