UTERMINAL
TERMINAL
NEXT
$V1$
$V1$
PAUSE
BOTCLEAN
ENCORE5
CLEAN
ENCORE
BOX
COMMAND
GO
chmod
SYNTAX
Absolute: chmod mode filename
Relative: chmod [user] +- = [permission] filename
SYNTAX
Absolute: chmod mode filename
Relative: 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!
The user option above may be replaced with:
a all users,
g group,
o others, or
u user (owner).
+ adds permission, - removes permission.
Permission is specified with x , r or w , to mean
execute, read or write.
The octal representation for file permission is
accepted as well, therefore the command :
chmod 755 * gives all permissions to
the owner, and read and execute for the group and others.
The command: chmod og-rw *
takes away read and write privileges from the group
and others for all the files in the directory.
The command: chmod 700 mydirectory
removes access to the directory mydirectory from
the group and others.
The command: chmod = invoices
will take away all permissions to the file called invoices.
Let's look at the long listing of files in the
current directory.
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 the ls command with the -l option.
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$
Type the command that will give the owner all permissions for all files
in the directory while giving execute only permission to the group and
others. Use octal notation to specify the absolute form of the command.
$PROMPT$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Please use chmod with permission 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$
Now verify that the file permissions have indeed
been changed by using the appropriate command.
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
No, use ls with the -l option.
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 demo 640 Nov 07 12:17 file1
-rwx--x--x 1 demo 402 Nov 01 15:34 file2
-rwx--x--x 1 demo 1402 Nov 09 20:57 file3
-rwx--x--x 1 demo 749 Sep 27 16:43 file4
-rwx--x--x 1 demo 2452 Nov 02 09:12 demofile1
$PROMPT$