chmod – change file mode bits

$ chmod +t source/
$ ls -l
total 12
drwxr-xr-x 2 ahiliation ahiliation 4096 2010-03-13 04:40 Desktop
drwxr-xr-x 2 ahiliation ahiliation 4096 2010-03-13 19:20 Downloads
drwxr-xr-t 2 ahiliation ahiliation 4096 2010-03-13 20:41 source

t - Save text attribute (sticky bit) - The user may delete or modify only those files in the directory that they own or have write permission for.

http://www.gnu.org/software/coreutils/manual/html_node/chmod-invocation.html

$chmod -c
$ls -l rwsem.c
-rw-rw-r-- 1 root root 21007 Aug 30  2011 rwsem.c
$chmod -c rwsem.c
chmod: missing operand after ‘rwsem.c’
Try 'chmod --help' for more information.
$chmod -c
chmod: missing operand
Try 'chmod --help' for more information.
$chmod -c 700  rwsem.c
chmod: changing permissions of ‘rwsem.c’: Operation not permitted
$sudo chmod -c 700  rwsem.c
mode of ‘rwsem.c’ changed from 0664 (rw-rw-r--) to 0700 (rwx------)
$

 

Leave a Reply

Your email address will not be published. Required fields are marked *