Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
No I don't want him to be owner. I just want to assign privs may be on rw of a files or directory to a specific user. As we do in the windows. But here in the chmod there is no parameter of a user name.
What's "ACL capabilities" mean?
I too would like to know whether or not I could assign user "abc" full rwx permissions for a dir on my system. (SuSE 8.2)
you said you wanted to have a specific user to have rwx access to certain files or directories. every user created is put in a group of his/her username. ie. user mr_hanky belongs to a group called mr_hanky already.
in terms of what you wanted, changing the group ownership of a file or directory to a username (who is automatically in a group named the same as the username) will do what you want.
So you mean that we can't give assign privs to a user but we can by granting privs ot the group the user belongs. Actually in the windows we assign privs to the user and also groups. Is this mandatory that each user will have him own group in Linux. If it is not mandatory then if there is a user without group then we can assign any privs except owner?
I just want to clear my confusion which a user face when he migrates from Novell or Win to Linux or Unix.
if you don't want to change the owner of a file or directory, then a user can only be given exclusive permissions by changing the priveledges for the group owner of the file or directory. there isn't a distro i know of that by default doesn't automatically create group named the same thing as the username for a newly created user. on red hat, if you have a user named mr_hanky, you can't even unassign mr_hanky from the group mr_hanky.
although there is a thing called sudoers that will alter the sudo file, but i'm not sure it handles file permissions. plus the file has to be a certain syntax too. but just changing the group ownership of a file is way easier.
I have just create a user in RH9 without private group but after creation the users group is assigned by default to this user as a primary group. When I tried to unassign the group it gave me a message that user must have member of a group. Ok what I got understanding that you can assign privs to a group and the assign the group to a user.
Say my user name is sikandar and have a file readme.doc so to grant rx privs to a user hayat I have to assign these privs to the group hayat so the user will get these privs. Am I right?
let's see if i'm understanding you here. you created a user, sikander, and checking the groups sikander belongs to, you see the user sikander belongs to a group called sikander, right?
then you tried to take user sikander out of the group sikander and got an error, right?
but in general, you're second question is right. let's say you have a group project stored in the directory called "project_x". the owner of the directory and files in that directory is owned by user sikander and the group owner is sikander. if you want user mr_hanky to have full access to the directory you have to create a group (let's call it project_x) and put mr_hanky in that group. then change the group ownership of the directory and files in that directory to project_x. then you need to change (or make sure) the permissions are set to give the group of the directory full access. so the above scenario you'd change the group ownership and permissions using:
but i thought you're original question was you wanted only a particular user to have access to a directory/files in which case, changing the group ownership to a user's name will work since that user will automatically belong to a unique group called the user's name.
an example of what i thought you were asking would be this entry in my /etc/fstab file. here i say my windows partition will give full access to only root and my user, vjong. i do this by setting the gid=vjong which really means that my user vjong belongs to a group called vjong (by default) and i change the group ownership of the c partition to group vjong (where only user vjong belongs to the group vjong). the umask=0002 sets the permissions for owner to RWX, the group to RWX, and others to RX.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.