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

Re: umask: file & dirs



Remco,

> > 	Is there any way to have a umask that creates files in 640 by
> > default and directories in 750 ?
> umask 027

	Thanks. I think I got the umask thing the wrong way around.

	I think I've got something the other way around with permissions
and umask.

	Lets see: for files 4 is read, 2 is write and 1 is execute. For
directories: 4 is 'ls' cabailities, 2 is add/delete files and 1 is the 'go
through' and be able to read the files is they have the proper attributes.

	If I have an umask of 027 then I should get the following result
independent of it's a file or dir: 750 -> rwxr-x--- 
	
	And now I'm geting 640 for files.

	What am I missing here?

	I guess that an you have to subtract 1 when dealing with files...

	TIA!

-- p.


Reply to: