Home
Certification Preparation
CompTIA
Linux+
File permissions
DevilWAH
Hi,
can you in linux do like in windows where files placed in a folder, take on the permissions from that folder and not from the user who created them.
I have an NFS mount point, but when ever some one on the linux box creates a file it takes on there permission. This then casues problems when windows users mount the same share through Cifs.
I want any files created in the mounted NFS directoy to take on the NFS nobody permission.
Find more posts tagged with
Comments
NightShade03
What you are looking for is the SetUID or SetGUID for file permissions. When you use chmod to assign permissions on the NFS share you can do something like: chmod 4775 <directory>
Anything created in that directory then takes on the permissions of the user but is owned by the group of the directory. You could do vice versa for user permissions inheritance or both user and group.
If you want to get really fancy you can also use ACLs on your directory/share. Check out this for ACLs (there is an NFS section):
Chapter 8. Access Control Lists
rogue2shadow
A chmod trick I learned was the following (for chmod using number notation):
4 - read
2 - write
1 - execute
To give someone "Full Control" like in Windows NTFS you would do the following:
chmod
777
file
You can modify file permissions based on users, groups, and "others" as each number serves as a place holder. I'm not truly sure if others is the "nobody" version of Window's permissions but who knows
Epic link:
http://catcode.com/teachmod/
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Best Of