Thursday, July 5, 2012

Debian file permissions

list file permissions with ls -l

-  rwx   r_x    _wx
 

  • The first "-"  says the file type. d|f|s (directory, file, or symlink)
  • The next three chars "rwx" are the privileges for the user
  • And the next "r_x" are the privileges for the group.
  • "_wx" are the privileges for others

Note the "_"  means denied. or not set.

chmod u-r myfile means , remove read privileges from the user.

e.g.
nano myfile.
touch myfile.
echo "blah" >> myfile
cat myfile.

No comments:

Post a Comment