Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
12-22-2006, 11:35 AM
|
#1
|
Member
Registered: Oct 2003
Location: Tucson
Distribution: Fedora, RHEL, Ubuntu
Posts: 225
Rep:
|
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:
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,
|
|
|
12-22-2006, 09:58 PM
|
#2
|
Senior Member
Registered: Mar 2006
Posts: 1,896
Rep:
|
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.
|
|
|
12-23-2006, 06:16 AM
|
#3
|
Member
Registered: Aug 2004
Location: India
Distribution: Redhat 9.0,FC3,FC5,FC10
Posts: 257
Rep:
|
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
|
|
|
12-23-2006, 10:59 AM
|
#4
|
Member
Registered: Oct 2003
Location: Tucson
Distribution: Fedora, RHEL, Ubuntu
Posts: 225
Original Poster
Rep:
|
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!
|
|
|
12-23-2006, 12:22 PM
|
#5
|
Member
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 25, 26, RHL 5.2
Posts: 560
Rep:
|
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:39 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|