To set different file permissions for different users of same group


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers To set different file permissions for different users of same group
# 1  
Old 04-24-2012
To set different file permissions for different users of same group

Hi,

If User1, User2 and User3 are in the same group. User1 should not be able to view the files of User2 and User3. But User2 and User3 should be able to view all files.

How to set permission for this.

Please help.

Thanks,
Priya.
# 2  
Old 04-24-2012
With plain Unix permissions you will have to make an extra group containing only User2 and User3. Assign the group to the files/directory and that's it. Surely I do not know if it is that easy in your environment due to dependancies etc.
A file/directory can only have the permissions for 1 user, 1 group and all others on the system, which you can easily see issuing a ls -la.
If you want to set up some more complicated permissions, have a look into ACL (Access Control Lists). We usually try to to avoid using them and were successful so far with that.

Last edited by zaxxon; 04-24-2012 at 06:04 AM.. Reason: phrasing
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script for adding users to file permissions

I need a script to add the following two users ids to the permissions for various files: IIS_WPG and IUSR_CowGirl. I am fairly familiar with scripting but haven't been able to figure out how to do this via a script. Manually doing it is slow. I don't want to create users but only add them to a... (2 Replies)
Discussion started by: Stu Loventhal
2 Replies

2. Windows & DOS: Issues & Discussions

Script for adding users to file permissions

I need a script to add the following two users ids to the permissions for various files: IIS_WPG and IUSR_CowGirl. I am fairly familiar with scripting but haven't been able to figure out how to do this via a script. Manually doing it is slow. I don't want to create users but only add them to a... (2 Replies)
Discussion started by: Stu Loventhal
2 Replies

3. UNIX for Advanced & Expert Users

Group permissions question

I have a user who has had an id change. His old id was xl00 his new id b000999. Both id's are in group bauser. The user now cannot access his old files even though he is in the same group and permissions seem to be ok. See below, first 2 files he can't see, second two are no problem. ... (2 Replies)
Discussion started by: dw82199
2 Replies

4. UNIX for Dummies Questions & Answers

Root group permissions

Hi everybody, which are the root group permissions and how can I give to a user these rights? Thanks in advance. (2 Replies)
Discussion started by: bmayao
2 Replies

5. Solaris

Group Permissions - How to tell the difference

I am a member of a few different user groups. I would like to see what the difference is.... Can anyone tell me how to look at permissions side by side ? We are using : SunOS xxxxxx 5.10 Generic_127111-09 sun4u sparc SUNW,Sun-Fire-V440 Thanks ! (10 Replies)
Discussion started by: popeye
10 Replies

6. UNIX for Dummies Questions & Answers

Group permissions

Hi, I've created a user named fwadmin, group named fwadmin and made the user belong to that group. I created the user and group using the 'User Manager' in Centos. The user belongs to /etc/fw.Does this also mean that the group fwadmin belongs to /etc/fw. That is what I want. But when I... (4 Replies)
Discussion started by: anaigini45
4 Replies

7. Cybersecurity

File owned by oracle user and dba group need readonly access to other users

Under oracle user file abc.txt was created. Oracle user belong to dba group on UNIX Server. However other non Oracle users which belongs to some other network groups need read only access to this file. Every time when I login as other then oracle user and try to view this file it saying that I... (2 Replies)
Discussion started by: groosha
2 Replies

8. Shell Programming and Scripting

checking Permissions of file for OTHERS and GROUP

Hi, Is their a way to check the read and execute permission on a file on OTHERS and GROUP rwxr--r-x I am trying something like: if ( || ) then .... fi The code above only checks the permissions of the owner of the file but not for the GROUP and OTHERS. I will really... (5 Replies)
Discussion started by: rkumar28
5 Replies

9. UNIX for Dummies Questions & Answers

How to set the name of the group and the owner while creation of the file?

How to set the name of the group and the owner while creation of the file? -rwxrwxr-x 1 root sys 1202 Dec 5 2002 abc.awk like here i need to set the name of root and sys to xxx xxx Any help is appreciated. Thanks. (2 Replies)
Discussion started by: nehak
2 Replies

10. Filesystems, Disks and Memory

group permissions/webserver

Hi, there is one strange situation with directory permissions that I run into every now and then, and now I face it a gain with a webserver. Situation (example): drwxrwsr-x 14 user www-data 4096 Jul 28 11:06 . drwxr-xr-x 2 www-data www-data 4096 Jul 28 11:06 subdir -rwxr-xr-x 1... (3 Replies)
Discussion started by: doozer
3 Replies
Login or Register to Ask a Question