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

Notices


Reply
  Search this Thread
Old 12-22-2006, 11:35 AM   #1
cuco76
Member
 
Registered: Oct 2003
Location: Tucson
Distribution: Fedora, RHEL, Ubuntu
Posts: 225

Rep: Reputation: 31
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,
 
Old 12-22-2006, 09:58 PM   #2
blackhole54
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
live_dont_exist
Member
 
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:
Code:
ls -la / | grep data
cat /etc/groups | grep data
cat /etc/passwd | grep chris
Cheers
Arvind
 
Old 12-23-2006, 10:59 AM   #4
cuco76
Member
 
Registered: Oct 2003
Location: Tucson
Distribution: Fedora, RHEL, Ubuntu
Posts: 225

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
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 25, 26, 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.

Bill
 
  


Reply


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:39 PM.

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