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 give full permission to only two user. This two user must be have write, delete, read permission But Only this two user must be have this permissions.
How can i give this permissions? How to must i do settings with which commands? How to must be group and user settings of this folder?
Unless you're using ACL extensions on ext3 or something then the only way to do this is to create a new group, add those two users to the group and change the ownership of the directory to the new group you created.
groupadd somegroup
usermod dave -a -G somegroup
usermod fred -a -G somegroup
chgrp somegroup /that/folder/where/ever/it/is
chmod g+rwx /that/folder/where/ever/it/is
Unless you're using ACL extensions on ext3 or something then the only way to do this is to create a new group, add those two users to the group and change the ownership of the directory to the new group you created.
groupadd somegroup
usermod dave -a -G somegroup
usermod fred -a -G somegroup
chgrp somegroup /that/folder/where/ever/it/is
chmod g+rwx /that/folder/where/ever/it/is
Hi Cris,
I am getting this error messages when I run the this commands. Why i am getting this "usermod: user somegroup does not exist" message?
Quote:
[root@34istlinuxtest ~]# groupadd somegroup
[root@34istlinuxtest ~]# adduser dave
[root@34istlinuxtest ~]# usermod dave -a -G somegroup
usermod: user somegroup does not exist
[root@34istlinuxtest ~]# adduser fred
[root@34istlinuxtest ~]# usermod fred -a -G somegroup
usermod: user somegroup does not exist
Unless you're using ACL extensions on ext3 or something then the only way to do this is to create a new group, add those two users to the group and change the ownership of the directory to the new group you created.
groupadd somegroup
usermod dave -a -G somegroup
usermod fred -a -G somegroup
chgrp somegroup /that/folder/where/ever/it/is
chmod g+rwx /that/folder/where/ever/it/is
I don't think it's enough.
While definitely only dave and fred will be able read/write files in this folder they likely will not be able change files created by another user
(unless files created with permissions 0666.
I suggest
Code:
chmod 2070 /that/folder/where/ever/it/is
After that all files created under this directory will have group 'somegroup'
If users' umask is 002 (standard on RedHat-like system) then SGID bit on directory + umask will provide all memeber of 'somegroup' with read/write access to all files under /that/folder/where/ever/it/is directory
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.