Results 1 to 2 of 2
Thread: Permission inherited by users
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Aug 2011
Permission inherited by users
I am running Fedora and have this issue on my system:
I have the following users:
I have the following group which all users belong to:
I have the following folder with appropriate permissions:
drwxrwxrwx 3 jane lab 4096 2012-06-26 10:40 xrf
drwxrwxrwx 39 jane lab 4096 2012-08-01 16:05 jobs
drwxrwxr-x 3 jane lab 36864 2012-08-03 15:46 t000
When a user jane creates a file in t000 for example 00001.
this file automatically gets the following permissions:
-rwxr-xr-x 1 jane lab 1060 2012-08-03 15:46 00001
User jules cannot write or access this 00001 file. That is my problem.
How can user jules also automatically access this file without changing permissions manually each time a file is created?
- Join Date
- Apr 2009
- I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
You need to change Jane's umask environment so that when she creates a file it has the appropriate group permissions. This is a shell command that can be used to set the environment in the users .bash_profile script. From the bash man page:
umask [-p] [-S] [mode] The user file-creation mask is set to mode. If mode begins with a digit, it is interpreted as an octal number; otherwise it is interpreted as a symbolic mode mask similar to that accepted by chmod(1). If mode is omitted, the current value of the mask is printed. The -S option causes the mask to be printed in symbolic form; the default output is an octal number. If the -p option is supplied, and mode is omitted, the output is in a form that may be reused as input. The return status is 0 if the mode was successfully changed or if no mode argument was supplied, and false otherwise.Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!