Re: Solaris - umask
From: Joe Durusau (joe.durusau_at_lmco.com)
Date: 09/25/03
- Next message: Chris Mattern: "Re: Solaris - umask"
- Previous message: Stein Arne Storslett: "Re: Solaris - umask"
- In reply to: Stein Arne Storslett: "Re: Solaris - umask"
- Next in thread: Chris Mattern: "Re: Solaris - umask"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 25 Sep 2003 10:51:02 -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
>
> > user1 is running a server application which generates some files.
> > these files are to be created in a directory dir1 which is owned by
> > user2 and that directory has group level write permission allowed.
> > user1 and user2 both belong to same group (say grp1).
> >
> > the profile of user1 contains the command umask 002. The files created
> > by the application (running by user1) should have the umask (or am I
> > thinking in wrong direction ?). But they don't have the write
> > permission on the group level (i.e. the umask does not seem to work).
> >
> > when we try to simulate the situation manually (creating files
> > manually in dir1 by user1), the permissions seem to be correct.
> >
> > What can I be doing wrong ?
>
> My guess is that you need to restart your application with the correct
> umask set. Your application does not parse umask again after it is
> started.
>
> --
> Stein Arne
Another guess: If the app is not being run by the user directly,
but being run by cron or at, the umask willnot work because the profile
will not be read.
Speaking only for myself,
Joe Durusau
- Next message: Chris Mattern: "Re: Solaris - umask"
- Previous message: Stein Arne Storslett: "Re: Solaris - umask"
- In reply to: Stein Arne Storslett: "Re: Solaris - umask"
- Next in thread: Chris Mattern: "Re: Solaris - umask"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|