|
On Wed, 4 Jun 2003 Patrick.F.O'Dowd@xxxxxxx wrote: > > Apologies if this is off topic! Unless you're doing it in Java, on/around the '400, it's off-topic!! > On hp-ux i set the umask in the .profile to 000, i though this would > give rwxrwxrwx to anything created under the profile. When I create shell > scripts they have rw-rw-rw- i.e. no execute permissions. Any ideas why and > how can I give execute permissions without having to do a chmod manually? umask turns off bits specified by the program. So, if the program sets the mode to (octal) 0666, and your umask is set to (octal) 022, the mode will end up as 0644. Make sense? The bits in the umask are turned off in the mode before the file is created. So, your umask of 000 doesn't turn anything off. It simply uses whatever the program specifies. If the program were to specify 0777, then your script would be 0777 as you requested. But it doesn't know that what you're creating is a script, and therefore doesn't know that it should use 0777 instead of 0666. It doesn't matter what you do with the umask, since there's nothing in 0666 that can be turned off to make 0777!
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.