Professional Web Applications Themes

Change default UMASK - Ubuntu

I have tried to change the default umask settings in several different places with no success. What I want to do is create a folder that different users can use to put shared doents in. The problem I am having is when user #1 creates a doent it is read only for the group and if user #2 opens it, it is read only. How do I change it so that by default when a user creates a doent someone else in the same group can open the file for read write. I assume I have to change the default ...

  1. #1

    Default Change default UMASK

    I have tried to change the default umask settings in several different
    places with no success.

    What I want to do is create a folder that different users can use to put
    shared doents in. The problem I am having is when user #1 creates a
    doent it is read only for the group and if user #2 opens it, it is
    read only. How do I change it so that by default when a user creates a
    doent someone else in the same group can open the file for read write.

    I assume I have to change the default umask to get this to work but
    everything I have tried leaves the umask 022.

    Can someone tell me the proper way to get this going.

    Ian
    Ian Guest

  2. #2

    Default Re: Change default UMASK

    Ian wrote:
    > I have tried to change the default umask settings in several different
    > places with no success.
    >
    > What I want to do is create a folder that different users can use to put
    > shared doents in. The problem I am having is when user #1 creates a
    > doent it is read only for the group and if user #2 opens it, it is
    > read only. How do I change it so that by default when a user creates a
    > doent someone else in the same group can open the file for read write.
    >
    > I assume I have to change the default umask to get this to work but
    > everything I have tried leaves the umask 022.
    >
    > Can someone tell me the proper way to get this going.
    Change the sticky bit for the group on the directories you need group RW on.
    No offence, but this is all explained REALLY well in the man page:

    man chmod

    Let me know if you have any questions.

    HTH,

    James
    --
    I am the mother of all things, and all things should wear a sweater.

    Centurion Guest

  3. #3

    Default Re: Change default UMASK

    Centurion wrote:
    > Ian wrote:
    >
    >> I have tried to change the default umask settings in several different
    >> places with no success.
    >>
    >> What I want to do is create a folder that different users can use to put
    >> shared doents in. The problem I am having is when user #1 creates a
    >> doent it is read only for the group and if user #2 opens it, it is
    >> read only. How do I change it so that by default when a user creates a
    >> doent someone else in the same group can open the file for read write.
    >>
    >> I assume I have to change the default umask to get this to work but
    >> everything I have tried leaves the umask 022.
    >>
    >> Can someone tell me the proper way to get this going.
    >
    > Change the sticky bit for the group on the directories you need group RW on.
    > No offence, but this is all explained REALLY well in the man page:
    >
    > man chmod
    >
    > Let me know if you have any questions.
    >
    > HTH,
    >
    > James
    No offense taken. From the man chmod I copied this
    > When the sticky bit is set on a directory, files in that directory may
    > be unlinked or renamed only by root or their owner. Without the sticky
    > bit, anyone able to write to the directory can delete or rename files.
    > The sticky bit is commonly found on directories, such as /tmp, that are
    > world-writable.
    Seems the sticky bit it only prevents users deleting or renaming files.

    If you meant set the group ID bit that doesn't solve my problem either.
    Yes the users have rw access to the folder, but my problem is, if user
    number one fires up open office and creates a new doent and saves it
    to the folder it is saved with rwx r-- r-- permissions no matter how I
    set permissions on the folder. So if user number two opens the doent
    he can't edit it. He can make a copy of it and edit the the copy, but
    can't edit the original.

    It's a pain if the doent creator has to go back in and change the
    permissions to rwx rw- r-- every time he creates a doent.

    I think I need to change the default creation mask from 022 to 002. I
    just can't seem to find the right place to make the change stick.

    Ian
    Ian Guest

  4. #4

    Default Re: Change default UMASK

    Ian wrote:
    > Centurion wrote:
    >> Ian wrote:
    >>
    >>> I have tried to change the default umask settings in several different
    >>> places with no success.
    >>>
    >>> What I want to do is create a folder that different users can use to put
    >>> shared doents in. The problem I am having is when user #1 creates a
    >>> doent it is read only for the group and if user #2 opens it, it is
    >>> read only. How do I change it so that by default when a user creates a
    >>> doent someone else in the same group can open the file for read
    >>> write.
    >>>
    >>> I assume I have to change the default umask to get this to work but
    >>> everything I have tried leaves the umask 022.
    >>>
    >>> Can someone tell me the proper way to get this going.
    >>
    >> Change the sticky bit for the group on the directories you need group RW
    >> on. No offence, but this is all explained REALLY well in the man page:
    >>
    >> man chmod
    >>
    >> Let me know if you have any questions.
    >>
    >> HTH,
    >>
    >> James
    >
    > No offense taken. From the man chmod I copied this
    >
    >> When the sticky bit is set on a directory, files in that directory may
    >> be unlinked or renamed only by root or their owner. Without the
    >> sticky
    >> bit, anyone able to write to the directory can delete or rename
    >> files. The sticky bit is commonly found on directories, such as
    >> /tmp, that are world-writable.
    >
    > Seems the sticky bit it only prevents users deleting or renaming files.
    >
    > If you meant set the group ID bit that doesn't solve my problem either.
    > Yes the users have rw access to the folder, but my problem is, if user
    > number one fires up open office and creates a new doent and saves it
    > to the folder it is saved with rwx r-- r-- permissions no matter how I
    > set permissions on the folder. So if user number two opens the doent
    > he can't edit it. He can make a copy of it and edit the the copy, but
    > can't edit the original.
    >
    > It's a pain if the doent creator has to go back in and change the
    > permissions to rwx rw- r-- every time he creates a doent.
    >
    > I think I need to change the default creation mask from 022 to 002. I
    > just can't seem to find the right place to make the change stick.
    Ah - I see what you're trying to do. Apologies - I read your first post
    rather quickly...my bad.

    /etc/login.defs is the magic you're after :) Read the comments in there
    though as it may not be the best solution for your situation.

    If your users enter the system from various points (login, ssh, gdm, etc)
    you may want to use the "libpam-umask" package instead:

    This PAM module sets the umask for successfully authenticated sessions.
    The umask affects the permissions assigned to newly created files by
    default.

    This package is useful to ensure that users' umasks are set consistently
    whether their session is initiated by login, SSH, a display manager for
    the X Window System, or some other means.

    Sorry about the confusion earlier :)

    Cheers,

    James
    --
    Just because he's dead is no reason to lay off work.

    Centurion Guest

  5. #5

    Default Re: Change default UMASK

    Centurion wrote:
    > Ian wrote:
    >
    >> Centurion wrote:
    >>> Ian wrote:
    >>>
    >>>> I have tried to change the default umask settings in several different
    >>>> places with no success.
    >>>>
    >>>> What I want to do is create a folder that different users can use to put
    >>>> shared doents in. The problem I am having is when user #1 creates a
    >>>> doent it is read only for the group and if user #2 opens it, it is
    >>>> read only. How do I change it so that by default when a user creates a
    >>>> doent someone else in the same group can open the file for read
    >>>> write.
    >>>>
    >>>> I assume I have to change the default umask to get this to work but
    >>>> everything I have tried leaves the umask 022.
    >>>>
    >>>> Can someone tell me the proper way to get this going.
    >>> Change the sticky bit for the group on the directories you need group RW
    >>> on. No offence, but this is all explained REALLY well in the man page:
    >>>
    >>> man chmod
    >>>
    >>> Let me know if you have any questions.
    >>>
    >>> HTH,
    >>>
    >>> James
    >> No offense taken. From the man chmod I copied this
    >>
    >>> When the sticky bit is set on a directory, files in that directory may
    >>> be unlinked or renamed only by root or their owner. Without the
    >>> sticky
    >>> bit, anyone able to write to the directory can delete or rename
    >>> files. The sticky bit is commonly found on directories, such as
    >>> /tmp, that are world-writable.
    >> Seems the sticky bit it only prevents users deleting or renaming files.
    >>
    >> If you meant set the group ID bit that doesn't solve my problem either.
    >> Yes the users have rw access to the folder, but my problem is, if user
    >> number one fires up open office and creates a new doent and saves it
    >> to the folder it is saved with rwx r-- r-- permissions no matter how I
    >> set permissions on the folder. So if user number two opens the doent
    >> he can't edit it. He can make a copy of it and edit the the copy, but
    >> can't edit the original.
    >>
    >> It's a pain if the doent creator has to go back in and change the
    >> permissions to rwx rw- r-- every time he creates a doent.
    >>
    >> I think I need to change the default creation mask from 022 to 002. I
    >> just can't seem to find the right place to make the change stick.
    >
    > Ah - I see what you're trying to do. Apologies - I read your first post
    > rather quickly...my bad.
    >
    > /etc/login.defs is the magic you're after :) Read the comments in there
    > though as it may not be the best solution for your situation.
    >
    > If your users enter the system from various points (login, ssh, gdm, etc)
    > you may want to use the "libpam-umask" package instead:
    >
    > This PAM module sets the umask for successfully authenticated sessions.
    > The umask affects the permissions assigned to newly created files by
    > default.
    >
    > This package is useful to ensure that users' umasks are set consistently
    > whether their session is initiated by login, SSH, a display manager for
    > the X Window System, or some other means.
    >
    > Sorry about the confusion earlier :)
    >
    > Cheers,
    >
    > James
    That is exactly what I'm looking for, I'll give it a try

    Thanks again

    Ian
    Ian Guest

Similar Threads

  1. How to change default Acrobat application ?
    By HansGeorg_Ulrich@adobeforums.com in forum Adobe Acrobat SDK
    Replies: 1
    Last Post: October 28th, 04:53 PM
  2. Change the default browser
    By HCBen in forum Macromedia Contribute Connection Administrtion
    Replies: 1
    Last Post: April 28th, 02:46 AM
  3. CGI popup_menu does not change default selection
    By Yuri Shtil in forum PERL Modules
    Replies: 6
    Last Post: March 30th, 11:06 PM
  4. Default save location/How to change???
    By Chris_Willoughby@adobeforums.com in forum Adobe Acrobat Windows
    Replies: 0
    Last Post: May 6th, 08:37 PM
  5. change the default name that appears at login
    By anarchisted in forum Windows Setup, Administration & Security
    Replies: 0
    Last Post: July 9th, 01:26 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139