Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Permission inherited by users


    Hi Felas

    I am running Fedora and have this issue on my system:

    I have the following users:

    jane:552:100::/usr1/users/jane:/bin/bash
    jules:553:100::/usr1/users/jules:/bin/bash

    I have the following group which all users belong to:

    lab:100:root,jules,jane

    I have the following folder with appropriate permissions:
    xrf/jobs/t000

    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?

    Regards

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    14,009
    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:
    Code:
           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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •