Folder and file permission
I have a folder 'wscale' with 777 permission.
[root@TPL0635 out]# ls -lrt
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? Any help will be much appreciated.
drwxrwxrwx : Let me split what each part means --
d: Its a directory
rwx: Read Write Execute for User/Owner
rwx: Read Write Execute for Group
rwx: Read Write Execute for others (not the owner of the file and the users in the group, but anybody apart from this)
So if the user you are going to add is not in that group, change the permission of the file to 774. This would change the directory permission from drwxrwxrwx to drwxrwxr-- . But this would apply ONLY for the directory, so you might have to do this for all individual files in the directory.
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
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
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)
Thank you all for your response and assistance.
Can I have 2 different individual user IDs diff permission on a particular folder?
e.g. - Folder is DOWNLOAD
Users are 'wscale' and 'monitor'
can I assign rw for 'wscale' and r_x for 'monitor' on folder DOWNLOAD?
If yes, how? 'wscale' and 'monitor' are members of different usergroup.
Read up on ACL (I suppose it is supported by Suse).
See http://www.linuxquestions.org/questi...?highlight=acl for my experience with it.
|All times are GMT -5. The time now is 08:54 PM.|