next up previous
Next: Time saving Tips Up: File System Commands Previous: Creating, deleting

securing

To tell the computer who can read, write and execute your files, use the chmod command. The format of the command is usually chmod $&% filename.

For example
% ls -al test.txt
-rw--r- 1 vastro vastro 121 May 21 00:46 test.txt
% chmod o-r test.txt
% ls -al test.txt
-rw---- 1 vastro vastro 121 May 21 00:46 test.txt
%

chmod o-r means dissallow others from reading this file. It is possible to string together some parts of the command. For instance, to allow group members read from and write to your file, do the following:
% chmod g+rw test.txt
% ls -al test.txt
-rw-rw-- 1 vastro vastro 121 May 21 00:46 test.txt
%

$\circ$ Exercise 12: Make all the files in the subdirectory data readable,writable and executable, only by you, and inaccessable to anybody else. Also, go to the ps directory and make all these files readable and executable by all, and writable for you.


next up previous
Next: Time saving Tips Up: File System Commands Previous: Creating, deleting
Vincent Jacobs 1999-09-24