|
5.04b Ownership and Permissions Utilities
chmod - changes
access permissions
Options:
u(user/owner),
g(group),
o(other), a(all)
+(plus),
-(minus), =(equal),
s-setuid/setgid)
-
There
are three categories of file owners: User, Group,
and Other
-
There
are three categories of permissions to be granted: Read,
Write and Execute
-
Executable
programs have two additional permissions:
Set UID
(userID)
and Set GUID (group
userID)
Examples: How
to sett permissions to a file using chmod
utility
|
[bash]$ chmod
a+rw foofile.doc
[bash]$
chmod u+s foo.program
[bash]$
chmod =r foo.file #(
This one grands read
permission to everybody) |
Examples: How
to sett permissions using an Octal Mode
|
[bash]$
chmod 644 foo.file
#(u=rw g=r o=r)
[bash]$
chmod 777 foo.file
#(makes the foo.file
executable file) |
umask [nnn]
- set file creation mask.
It determines which permissions are on or off. It disclose default permissions
set by system.
Options:
-S symbolic # (show
default permissions assigned to files)
chgrp - change
group ownership # (changes which group can access a file or a directory)
Options:
-c change
-R recursive
-v verbose
chown - changer
file owner and group # (changes the ownership of one file or more
files)
Options:
-c change
-R recursive
-v verbose
id - print
real and effective UID and GID # (it will display information about
yourself or another user)
Options:
-g group
-G Supplementary
groups
-n name
-u user id
groups - print
the groups the user is in
|