users in multiple groups and file permissions

berky

2[H]4U
Joined
Aug 28, 2001
Messages
2,233
So, to make a long story short, let's assume that I have a user's home directory /home/user1

this directory has permissions 750 and is owned by user1 and group user1

let's also say I have an admin user that is primarily a part of group admin, but also a part of group user1

what would stop admin from having read and execute permissions on this directory?


The long(er) story:

I'm running clamav and have a clamd daemon running as user admin (I could run it as any user, and I may make a special user later, but I don't want to run it as user1, user2, etc).

I have 2 (technically lots more, but let's just say 2 for now) users, user1 and user2 that have home directories /home/user1 and /home/user2. each is owned and group owned by user1:user1 and user2:user2 respectively with permissions of 750.

my admin user is part of groups admin, user1, and user2

I need this to be able to scan my user's directories using the command (is this correct?):
clamdscan --move=/files/quarantine/ --config-file=/etc/clamd.d/adm.conf /home/user1/file

doing this gives the error:
/home/user1/file: lstat() failed. ERROR

If I change the directory permissions to 755, it works fine.
Or if I leave the permissions 750 and change the directory group ownership to admin, it works fine.

So, why would this be? Obviously it is a permissions issue, but why is it not reading admin as part of the user1 group and allowing the same permissions as it does when making the directory group-owned by admin?

:confused::confused::confused:
 
Did you log your admin user out and then back in after you added it to the user groups?
 
just to be sure, I rebooted the pc. didn't help. Also, I ran a `groups admin` command to check and admin is definitely a part of the user1 group.
 
Oh, and just so everyone is aware, I'm running this on Fedora 10, with SELinux in permissive mode (not supposed to disallow anything; this was my first step).
 
Have you confirmed that clamdscan is running as the admin user?

Yes, it's actually clamd that clamdscan passes off the task to, but clamd is running as admin. (clamdscan runs as the current user, which in this case is root)
 
Back
Top