Quote:
Originally Posted by zion_rulz
I have a folder 'wscale' with 777 permission.
[root@TPL0635 out]# ls -lrt
total 1688
drwxrwxrwx 2 tux tplinux 4096 Jul 9 00:53 agrdata
drwxrwxrwx 2 tux tplinux 4096 Jul 9 17:08 wscale
Now, I want to create a user to give read only permission to this folder. How can I do this?
|
first
777 means rwx for everybody: the owner, the group, and all other users.
r is for 'read', w is for 'write', and 'x' is for 'execute'
to change file permissions you use the command chmod
If you want the owner of 'wscale' to be the only one to have
the write permission, you
$ chmod 755 wscale
if you 'ls' you'll see that the group (tplinux) and the other
users have rx permissions
$ ls -l
total 4
drwxr-xr-x 2 tux tplinux 4096 2009-07-09 15:07 wscale
Now, if you want the group to have write permission and the
other users only rx permissions, you
$ chmod 775 bogus
see the difference?
$ ls -l
total 4
drwxrwxr-x 2 tux tplinux 4096 2009-07-09 15:07 wscale
#######################
instead of 'chmod 775' you can also use the form
chmod o-w (remove the write permission to users that are
not in this group)
you should
man chmod