Re: Solaris - umask
From: Stein Arne Storslett (sastorsl_at_THOU.SHALT.NOT.SPAM.online.no)
Date: 09/25/03
- Next message: Joe Durusau: "Re: Solaris - umask"
- Previous message: Stephane CHAZELAS: "Re: Use "find" to search for files without extensions ?"
- Next in thread: Joe Durusau: "Re: Solaris - umask"
- Reply: Joe Durusau: "Re: Solaris - umask"
- Reply: Chris Mattern: "Re: Solaris - umask"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 25 Sep 2003 13:13:51 GMT
<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
- Next message: Joe Durusau: "Re: Solaris - umask"
- Previous message: Stephane CHAZELAS: "Re: Use "find" to search for files without extensions ?"
- Next in thread: Joe Durusau: "Re: Solaris - umask"
- Reply: Joe Durusau: "Re: Solaris - umask"
- Reply: Chris Mattern: "Re: Solaris - umask"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|