Results 1 to 5 of 5

Thread: how to have files created by a user with permission write and read for user and group ?

  1. #1

    Default how to have files created by a user with permission write and read for user and group ?

    following this thread may be is better to open another thread with another title
    in opensuse 13.2 and kde when a user create a file the permission of this file are write and read for user and read for group and others.
    is it possible to set the user to create files with permission write and read for user and group and read for others??
    manythanks, ciao :-) pier

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,384

    Default Re: how to have files created by a user with permission write and read for user and group ?

    When this is just for a few cases, trhe uer better does this after creating them (either from a desktop file manager or with
    Code:
    chmod g+w file1 file 2 .....
    When the user wants this done normaly, he can set his umask. The umask at the moment is most probably
    Code:
    henk@boven:~> umask
    0022
    henk@boven:~>
    Which means to not set the write bits for group and others on file creation.
    (027 is also a good setting).
    Setting
    Code:
    umask 0002
    will restrict that action to the "others" bit only.
    ( or set it to 0007 as wanted, in any case change that one 2 into a 0).

    As said, when a user wants this as a default, it is best to add this statement in his .profile (and re-login after doing this).
    Henk van Velden

  3. #3

    Default Re: how to have files created by a user with permission write and read for user and group ?

    Quote Originally Posted by hcvv View Post
    Setting
    Code:
    umask 0002
    As said, when a user wants this as a default, it is best to add this statement in his .profile (and re-login after doing this).
    ...manythanks, :-) it works fine.
    very interesting file this .profile..

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,384

    Default Re: how to have files created by a user with permission write and read for user and group ?

    Quote Originally Posted by pier_andreit View Post
    ...manythanks, :-) it works fine.
    very interesting file this .profile..
    Yes, but be carefull. Know what you are doing when changing/adding things there.
    Henk van Velden

  5. #5

    Default Re: how to have files created by a user with permission write and read for user and group ?

    Quote Originally Posted by hcvv View Post
    Yes, but be carefull. Know what you are doing when changing/adding things there.
    ...yes, thanks for the advice, I know that privacy of each user vanishes, but these are two laptops used by four users randomly, so the behaviour of linux about permission on files in this case is very annoying, and the privacy could be leaved apart... and also the different linux user settings are very useful especially with fastuserswitch widget..

Posting Permissions

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