chmod and chown
"chmod" changes the rights of a file.
"chown" changes the owner of a file.
In both cases, the file might be a directory as well.
Parameter
|
Meaning
|
u
|
user
|
g
|
group
|
o
|
others
|
a
|
all = ugo
|
r
|
read
|
w
|
write
|
s
|
SETUID-Bit SETGID-bit
|
t
|
sticky-bit
|
Examples
|
Meaning
|
chmod u+x filename
|
user is allowed to execute filename
|
chmod u-x filename
|
user is disallowed to execute filename
|
chmod ug+rwx filename
|
user and group have all rights on filename
|
chown newowner filename
|
newowner becomes the new owner of filename
|
chgrp newgroup filename
|
newgroup becomes the new group for filename
|
For more information on possible flags, try
man chmod, man chown.
[prev]
[top]
[next]
|