Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

setuid 1

Status
Not open for further replies.

santoshdj123

Technical User
Jun 15, 2003
98
IN
how is the usage of setuid command.
I want to allow only one user from OTHER group to access my file.
 
you do not want to set userid because it will do the opposite of what you want. The current user will inherit the owner's permissions. What you can do is create a group and make this one guy part of that group or you can change his group to be the same as yours. If you went with creating a new group and adding this guy to it, you now need to change the group ownership of the file or directory:

chgrp newgroup filename

 
Add him to the other group. It's very simple.
usermod -G groupname login on my distro.


 
i will explain my problem in detail.
there are three users A, B and C. A is the owner of file file.tar. User A want to give full permission of this file to B not C. All users are from different groups.
So can u tell me how i can do this.?
 
I thought we did. Users can belong to more than one group. Have A and B belong to a common group. Add B to group A for example. Then chmod to give group the same permission as A. Since C is neither owner or group, he will only have "other" permissions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top