1847671 Members
4016 Online
110265 Solutions
New Discussion

umask question

 
SOLVED
Go to solution
Starrynight
Advisor

umask question

Hi all

Does anyone knows what should be my umask if I want my files created with -rw-rw---- permissions?
The umask man page is very confuse...

Thanks in advance
System administrator
7 REPLIES 7
Pete Randall
Outstanding Contributor
Solution

Re: umask question

umask 006 works


Pete

Pete
T G Manikandan
Honored Contributor

Re: umask question

#umask 006

Elmar P. Kolkman
Honored Contributor

Re: umask question

The value for umask can be calculated as 777 -

You want 660 as permission, so you umask will be 117.

Since x-bits are normally not set when creating a file, the 'ones' can be ignored, so 006 should work to.

Every problem has at least one solution. Only some solutions are harder to find.
John Carr_2
Honored Contributor

Re: umask question

you might want the latest patch for umask while your on the subject PHKL_26995

John.
Starrynight
Advisor

Re: umask question

Hi Pete

Thanks for your reply.
Do you know if it's possible to me to set this umask for ftp for a specific user in 10.20 version?
I mean I know I can change ftp umask for all user with ftpd -u but I only want to change it for a particular one...not sure if it is possible.

Thanks
SN
System administrator
Pete Randall
Outstanding Contributor

Re: umask question

SN,

I'm not sure on that one so I'll leave it to others.


Pete

Pete
Bill Hassell
Honored Contributor

Re: umask question

10.20 is obsolete and the Washington University version wu-ftpd) was not supplied for that version of HP-UX. The ftp client on 10.20 (and other versions of HP-UX) allows the use of the chmod command. This requires the user to explicitly set the remote permissions as needed, but there is nothing in 10.20 that works for a specific user. If the user is on an HP-UX box, you could script an automated ftp transfer which performs the required chmod., but if the user is on a PC, you're out of luck (again) since the native ftp for DOS/Windows has no chmod command.


Bill Hassell, sysadmin