Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 12-22-2006, 11:35 AM   #1
Registered: Oct 2003
Location: Tucson
Distribution: Fedora, RHEL 5
Posts: 220

Rep: Reputation: 31
user groups and permissions questions


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:

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

chmod -Rv 775 /data
Still nothing, tried:

chmod g+rwx /data
LS -la shows:

[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
[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
[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.

Old 12-22-2006, 09:58 PM   #2
Senior Member
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
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.
Old 12-23-2006, 06:16 AM   #3
Registered: Aug 2004
Location: India
Distribution: Redhat 9.0,FC3,FC5,FC10
Posts: 257

Rep: Reputation: 30
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:
ls -la / | grep data
cat /etc/groups | grep data
cat /etc/passwd | grep chris
Old 12-23-2006, 10:59 AM   #4
Registered: Oct 2003
Location: Tucson
Distribution: Fedora, RHEL 5
Posts: 220

Original Poster
Rep: Reputation: 31
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!
Old 12-23-2006, 12:22 PM   #5
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 24, 25, RHL 5.2
Posts: 560

Rep: Reputation: 56
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.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Questions: Changing User Groups, Keeping background through restart, and more. Left Face Down Slackware 8 07-13-2006 02:02 PM
groups and permissions g_trueblood Slackware 2 10-07-2005 04:36 AM
multiple groups permissions steve007 Linux - Newbie 2 07-01-2005 12:24 PM
users/groups and permissions.... muman Linux - Newbie 2 09-21-2004 11:20 AM
user groups and permissions yank_ Linux - Newbie 1 02-26-2001 10:57 PM > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 01:32 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration