Re: Umask?
On Tue, 4 Apr 2006 12:43:37 -0400, Neil Schelly wrote: > I've got a debian system here and most definitely have the umask > command, but it's not a binary or a package or anything like that. > It's a BASH builtin, so you won't see it anywhere in a package. > > Anyway, in answer to the question you were trying to answer on the > BBS, default permissions are kinda decided by the process doing the > writing. Lots of daemons have options for default umasks, bash does > with the umask command, etc. That is the general term for how to > specify default permissions, but it doesn't imply a specific global > means of setting it. -N A good example of this is that for Win32 filesystems (vfat, smbfs), the ownership and permissions for the entire mount will be determined by the options given to mount, either on the command line or in the /etc/fstab file. This includes the umask= option, though IIRC use of the fmask and dmask options in lieu of umask is preferred nowadays, to let you specify differing permissions for files and for directories (respectively). Basically, when asked how to set default permissions on files, one needs to ask in return: "On *which* files?" :-) > On Tuesday 04 April 2006 12:09 pm, Ken D'Ambrosio wrote: > > Hey, all -- someone on a BBS I'm on asked about how to set default > > permissions on files, and I immediately thought of "umask"... which > > appeared to not be installed on my Debian box. So I plugged it into > > Debian's search page, and got essentially nothing. Is "umask" not > > used in Linux? Has it been deprecated? If so, what was it > > replaced with? Etc., etc., etc... -- Bill Mullen RLU #270075 ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Umask?
On Tuesday, Apr 4th 2006 at 12:09 -0400, quoth Ken D'Ambrosio: =>Hey, all -- someone on a BBS I'm on asked about how to set default =>permissions on files, and I immediately thought of "umask"... which =>appeared to not be installed on my Debian box. So I plugged it into =>Debian's search page, and got essentially nothing. Is "umask" not used in =>Linux? Has it been deprecated? If so, what was it replaced with? Etc., =>etc., etc... umask is a system call and a shell command in every shell. The idea is that the value that umask is set to is subtracted from the default permission of every file you create. So if your umask is set to 022 and you link an executable which would normally have a default permission of 777 then the resulting file would have a permission mask of 0777 - 022 == 0755. IOW, only the owner can write. Everyone else can read and execute. The umask value of a process is one of those attributes that are inherited by child processes, which is why umask has to be builtin to the shell. i.e., if you had a seperate process to set a umask value then the process would exit and the invoking process would remain unaffected. That's why the umask value that you want should not be set in your .bashrc Instead it should be set in your .bash_profile (assuming you're using bash), the same as setting your environment variables. -- Time flies like the wind. Fruit flies like a banana. Stranger things have .0. happened but none stranger than this. Does your driver's license say Organ ..0 Donor?Black holes are where God divided by zero. Listen to me! We are all- 000 individuals! What if this weren't a hypothetical question? steveo at syslang.net ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Umask?
I've got a debian system here and most definitely have the umask command, but it's not a binary or a package or anything like that. It's a BASH builtin, so you won't see it anywhere in a package. Anyway, in answer to the question you were trying to answer on the BBS, default permissions are kinda decided by the process doing the writing. Lots of daemons have options for default umasks, bash does with the umask command, etc. That is the general term for how to specify default permissions, but it doesn't imply a specific global means of setting it. -N On Tuesday 04 April 2006 12:09 pm, Ken D'Ambrosio wrote: > Hey, all -- someone on a BBS I'm on asked about how to set default > permissions on files, and I immediately thought of "umask"... which > appeared to not be installed on my Debian box. So I plugged it into > Debian's search page, and got essentially nothing. Is "umask" not used in > Linux? Has it been deprecated? If so, what was it replaced with? Etc., > etc., etc... > > Thanks, > > -Ken > > ___ > gnhlug-discuss mailing list > gnhlug-discuss@mail.gnhlug.org > http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Re: Umask?
$ /bin/bash $ type umask umask is a shell builtin Ken D'Ambrosio wrote: Hey, all -- someone on a BBS I'm on asked about how to set default permissions on files, and I immediately thought of "umask"... which appeared to not be installed on my Debian box. So I plugged it into Debian's search page, and got essentially nothing. Is "umask" not used in Linux? Has it been deprecated? If so, what was it replaced with? Etc., etc., etc... Thanks, -Ken ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
Umask?
Hey, all -- someone on a BBS I'm on asked about how to set default permissions on files, and I immediately thought of "umask"... which appeared to not be installed on my Debian box. So I plugged it into Debian's search page, and got essentially nothing. Is "umask" not used in Linux? Has it been deprecated? If so, what was it replaced with? Etc., etc., etc... Thanks, -Ken ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss