[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: umask is different in 8.0 [ SOLVED ]



Ah! If the script doesn't begin with #!/bin/sh it'll replace the umask:  

[ewood osas ewood]$ umask 0000
[ewood osas ewood]$ umask
0000
[ewood osas ewood]$ cat script
echo `umask`
echo "Touching foo"
touch foo

exit 0
[ewood osas ewood]$ ./script
0002
Touching foo
[ewood osas ewood]$ ls -l foo
-rw-rw-r--    1 ewood    ewood           0 Dec 19 17:10 foo

This wasn't so back in the RH 7.0 days. Must be a shell requirement now.
Thanks for you help on this issue.
-eric wood

----- Original Message ----- 
From: "Jesse Keating" <hosting j2solutions net>
To: <psyche-list redhat com>
Sent: Thursday, December 19, 2002 3:10 PM
Subject: Re: umask is different in 8.0


> On Thu, 19 Dec 2002 15:02:30 -0500
> "Eric Wood" <eric interplas com> wrote:
> 
> > But when a new child process spawns (say a shell script), the umask is
> > not inherited.  Is there a fix for that?
> 
> I can't duplicate that either.  
> [jkeating yoda temp]$ umask 000
> [jkeating yoda temp]$ ./script
> 0000
> Touching foo
> 
> total 20
> drwxrwxr-x    3 jkeating jkeating     4096 Dec 19 12:11 .
> drwx------   97 jkeating jkeating     8192 Dec 19 12:10 ..
> -rw-rw-rw-    1 jkeating jkeating        0 Dec 19 12:11 foo
> 
> 
> [jkeating yoda temp]$ cat script
> #!/bin/sh
> 
> echo `umask`
> echo "Touching foo"
> touch foo
> echo
> ls -al
> 
> exit 0
> 
> 
> -- 
> Jesse Keating RHCE MCSE
> For Web Services and Linux Consulting, Visit --> j2Solutions.net
> Mondo DevTeam (www.mondorescue.org)
> 
> Was I helpful?  Let others know:
>  http://svcs.affero.net/rm.php?r=jkeating
> 
> 
> 
> -- 
> Psyche-list mailing list
> Psyche-list redhat com
> https://listman.redhat.com/mailman/listinfo/psyche-list





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]