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

Re: file creation default permissions




(sorry if this is old news; I've been away for awhile)

charles@lunargraphics.net wrote:

> Is there any way to set all files created by an individual user to have
> default permssions set to 664 rather than 644?

Set their umask.  "man umask" gives you the umask() system call, but
that's good enough.  It's a shell builtin, so you can also find info about
the "umask" builtin in bash.

The short docs: The umask is the mask of the permission bits that are
always turned off when a file is created.  Example: A umask of "002"
(that's octal, as with most permission bit discussions) sets files to
"664" permissions by default, since: 666 & !(002) = 664.



--
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.