UTERMINAL
TERMINAL
NEXT
$V1$
$V1$
PAUSE
ENCORE5
ENCORE
BOX
COMMAND
GO
chmod
SYNTAX
chmod mode file ...
chmod [user] +- = [permission ...] filename
FUNCTION
chmod - changes the access permission of a
file or directory.
NOTES:
Only the owner or a superuser may change permissions!
user may be a (all users), g (group),
o (others), or u (owner).
+ adds file permission, - removes permission.
Permission is specified with x, r or w, to mean
execute, read and write.
The octal representation for file permission is accepted as well,
therefore a command: chmod 755 * - gives all permissions to
the OWNER, and read and execute for the GROUP and OTHERS.
The command: chmod = invoices
will take away all permissions to the file invoices.
The command: chmod og-rw *
takes away read and write privileges from the group
and all others for all of the files in the directory.
The command chmod 700 mydirectory
removes/locks away the file/directory mydirectory
from the group and others. Where 700 is the
octal representation of file permissions, as discussed
in the Lesson dealing with the UNIX file system.
Long directory listing practice - 1.8.3.0.6
Let us see the long listing of files in the
current directory:
Please type in: ls -l:
$PROMPT$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Please type ls -l
Please type ls -l
I guess I must type this for you:
$PROMPT$
FORGET1
Observe the result on the terminal!
ls -l
total 12
-rw-r--r-- 1 demo 640 Nov 07 12:17 file1
-rwxr--r-- 1 demo 402 Nov 01 15:34 file2
-rw------- 1 demo 1402 Nov 09 20:57 file3
-rw-r----- 1 demo 749 Sep 27 16:43 file4
-rwxr-xr-x 1 demo 2452 Nov 02 09:12 demofile1
$PROMPT$
Changing file permissions practice, - 1.8.3.0.7
Let us give the owner all permissions, while
giving execute permission only to the group and others for
all files. Please type in the appropriate command.
$PROMPT$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Please use chmod with protection 711 for all files (*)
Please type chmod 711 *
I guess I must type this for you:
$PROMPT$
FORGET2
Observe the result on the terminal!
chmod 711 *
$PROMPT$
Change in ownership verification practice, - 1.8.3.0.8
Now verify that indeed the file permissions
have indeed been changed by typing: ls -l
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Please type ls -l
Please type ls -l
I guess I must type this for you:
$PROMPT$
FORGET3
ls -l
Observe the result on the terminal!
total 12
-rwx--x--x 1 klm 640 Nov 07 12:17 file1
-rwx--x--x 1 klm 402 Nov 01 15:34 file2
-rwx--x--x 1 klm 1402 Nov 09 20:57 file3
-rwx--x--x 1 klm 749 Sep 27 16:43 file4
-rwx--x--x 1 demo 2452 Nov 02 09:12 demofile1
$PROMPT$