Re: Solaris - umask

From: Chris Mattern (syscjm_at_gwu.edu)
Date: 09/25/03

  • Next message: Casper H.S. ***: "Re: Solaris - umask"
    Date: Thu, 25 Sep 2003 12:36:47 -0400
    
    

    Stein Arne Storslett wrote:
    > <s_raghu20@yahoo.com> wrote in <d4998e2a.0309220815.2799dd7e@posting.google.com>:
    >
    >>We are trying to implement a group level write permission on newly
    >>created files on directory. We tried using
    >>
    >> umask 002
    >>
    >>but it works fine when we use it manually, but when an application
    >>which is run under the same user, tries to create the file, it does
    >>not provide the write permission.
    >
    >
    > As others pointed out "umask" just sets the "filter" for what
    > permissions new files and directories will be created with.
    >
    > Files default 666 - 002 = 664
    > Dirs default 777 - 002 = 775
    >
    And where does the default come from? Why, it comes from the
    program creating the file, which can set that default to whatever
    it wants. 666 or 777 is the usual practice, but if the program
    decides to make it 644, then the file will not be group/other
    writable *and umask cannot make it so.* The only way to
    get the program to produce group or other writable files
    is to modify the program itself.

                   Chris Mattern


  • Next message: Casper H.S. ***: "Re: Solaris - umask"
  • Quantcast