[SOLVED] chmod 777 a directory only for a user not for all
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I want to let user x to have all rights (delete, create, append, etc) on a directory / folder. But I want only that user to have R+W rights to that directory, and therefor I can't do chmod 777 to that directory, 'cause there are other users that needs to have only read access to that directory / folder. I'm using vsftp server and I'm letting the users to connect with the totalcomander client.
I want user1 to be able to read, delete and write in that folder / directory.
I want user2 to have only read access and write access to the same folder / directory.
I want user3 to have only read access to the same folder / directory.
How do I do this ?
I want to do this NOT with samba, I want to do this with the ftp (vsftp).
I want user1 to be able to read, delete and write in that folder / directory.
I want user2 to have only read access and write access to the same folder / directory.
I want user3 to have only read access to the same folder / directory.
How do I do this ?
I want to do this NOT with samba, I want to do this with the ftp (vsftp).
I think you will need to use the "sticky" setting for this and I don't remember how to do that from the CLI.
Ok, and the chmod for that directory ? What it should be ? 644 ?
Because at the moment it's 777, I needed to chmod 777 so that the user can write at that moment so now I need to change back. But, change back to what ? 644 ?
Yes ytd, you can change back the permission to 644 or whatever default permission you would like to give it to your directory. This permission will be applicable to all the users "other" than what is set by the setfacl command.
[root@xxx ~]# setfacl --help
setfacl 2.2.23 -- set file access control lists
Usage: setfacl [-bkndRLP] { -m|-M|-x|-X ... } file ...
-m, --modify=acl modify the current ACL(s) of file(s)
-M, --modify-file=file read ACL entries to modify from file
-x, --remove=acl remove entries from the ACL(s) of file(s)
-X, --remove-file=file read ACL entries to remove from file
-b, --remove-all remove all extended ACL entries
-k, --remove-default remove the default ACL
--set=acl set the ACL of file(s), replacing the current ACL
--set-file=file read ACL entries to set from file
--mask do recalculate the effective rights mask
-n, --no-mask don't recalculate the effective rights mask
-d, --default operations apply to the default ACL
-R, --recursive recurse into subdirectories
-L, --logical logical walk, follow symbolic links
-P, --physical physical walk, do not follow symbolic links
--restore=file restore ACLs (inverse of `getfacl -R')
--test test mode (ACLs are not modified)
--version print version and exit
--help this help text
[root@xxx ~]#
I could find no references which states that enabling up acl to your file-system slows it down. If you come across any such point in documentation then please share it so that u receive better help.
Just to point out that acls are set 'on' on the partitions that exist during the install of RHEL5, BUT if you create a new partition from scratch after installation, acls will not be automatically set on. Use the tune2fs cmd or the options in /etc/stab to do that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.