LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   user groups and permissions questions (https://www.linuxquestions.org/questions/linux-security-4/user-groups-and-permissions-questions-512903/)

cuco76 12-22-2006 11:35 AM

user groups and permissions questions
 
hello

I have a mount point /data (/dev/sdc) I want all users in a certain group to be able to write to that folder. I created a group called data and added the users to that group.

I then:

Code:

chown -R root:data /data
user 'chris' wasn't able to write so I:

Code:

chmod -Rv 775 /data
Still nothing, tried:

Code:

chmod g+rwx /data
LS -la shows:

Code:

[root@fedora ~]# ls -la /data
total 32
drwxrwxr-x  4 root data  4096 Dec 22 10:17 .
drwxr-xr-x 24 root root  4096 Dec 22 07:32 ..
drwxrwxr-x  2 root data  4096 Dec 22 10:17 FC5Stuff
drwx------  2 root data 16384 Dec 21 12:08 lost+found

Also mtab
Code:

[root@fedora ~]# cat /etc/mtab
/dev/sda3 / ext3 rw 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
/dev/sda1 /boot ext3 rw 0 0
/dev/sdc1 /data ext3 rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
automount(pid1891) /net autofs rw,fd=4,pgrp=1891,minproto=2,maxproto=4 0 0

and fstab
Code:

[root@fedora ~]# cat /etc/fstab
LABEL=/                /                      ext3    defaults        1 1
LABEL=/boot1            /boot                  ext3    defaults        1 2
LABEL=/data1            /data                  ext3    defaults        1 2
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
tmpfs                  /dev/shm                tmpfs  defaults        0 0
proc                    /proc                  proc    defaults        0 0
sysfs                  /sys                    sysfs  defaults        0 0
LABEL=SWAP-sda2        swap                    swap    defaults        0 0

Am i missing something? Does it matter if the group i created is the users prinary group? I think that if I 777 the directory it would work but i don't want everyone to access it, just a few users.

I am running FC5 if it helps.

Thanks,

blackhole54 12-22-2006 09:58 PM

I don't see anything wrong. In particular, any member of group data should be able to write to /data/FC5stuff. Just to make sure nothing weird is going on (that I missed), I suggest you verify that root can write to this folder.

Beyond that, verify that chris is actually a member of group data by having that user type groups, which will list all groups that user is a member of. Or you can do this yourself by suing to that user.

Beyond that, be aware that groups are assigned at login. This means if a user is logged on when you change group assignments, that user will need to log out and log back in before the change takes effect.

live_dont_exist 12-23-2006 06:16 AM

Hey Chris,
Whats the permissions on /data itself? It too should be 755 but you might want to double check incase "chris" cant cd into /data.

Is Chris able to do other stuff? Can he go elsewhere or does "chris" have a problem everywhere?

Put in the output of:
Code:

ls -la / | grep data
cat /etc/groups | grep data
cat /etc/passwd | grep chris

Cheers
Arvind

cuco76 12-23-2006 10:59 AM

Thanks blackhole54 for the help! Well since I am running linux and never have to reboot. I had never logged off user chris and once i did it all worked.

Thanks again gents and/or ladies!

wmakowski 12-23-2006 12:22 PM

Yes, I've been caught by that before. You can change the permissions and add a group to a user, but until they logout and login it does not take effect.

Bill


All times are GMT -5. The time now is 04:33 AM.