[luau] Saving in /home
Tom_Gordon/RISE/HIDOE at notes.k12.hi.us
Tom_Gordon/RISE/HIDOE at notes.k12.hi.us
Mon Sep 29 23:09:00 PDT 2003
If the user is creating files over a samba share you can change the
default permissions by changing the options on smb.conf (or SWAT) for that
share.
Here is the man page for umask:
umask [-p] [-S] [mode]
The user file-creation mask is set to mode. If mode begins
with
a digit, it is interpreted as an octal number; otherwise
it is
interpreted as a symbolic mode mask similar to that accepted
by
chmod(1). If mode is omitted, the current value of the
mask is
printed. The -S option causes the mask to be printed in
sym-
bolic form; the default output is an octal number. If
the -p
option is supplied, and mode is omitted, the output is in a
form
that may be reused as input. The return status is 0 if the
mode
was successfully changed or if no mode argument was
supplied,
and false otherwise.
here is a real example:
[memeyou at memeyou test]$ umask 077
[memeyou at memeyou test]$ umask
0077
[memeyou at memeyou test]$ touch mooo
[memeyou at memeyou test]$ ls -lta
total 8
drwxrwxr-x 2 memeyou memeyou 4096 Sep 29 22:26 .
-rw------- 1 memeyou memeyou 0 Sep 29 22:26 mooo
drwx--x--x 29 memeyou memeyou 4096 Sep 29 22:23 ..
[memeyou at memeyou test]$ umask 002
[memeyou at memeyou test]$ umask
0002
[memeyou at memeyou test]$ touch moo
[memeyou at memeyou test]$ ls -lta
total 8
drwxrwxr-x 2 memeyou memeyou 4096 Sep 29 22:26 .
-rw-rw-r-- 1 memeyou memeyou 0 Sep 29 22:26 moo
-rw------- 1 memeyou memeyou 0 Sep 29 22:26 mooo
drwx--x--x 29 memeyou memeyou 4096 Sep 29 22:23 ..
Have fun!
Tom
Please respond to luau at videl.ics.hawaii.edu
Sent by: luau-admin at videl.ics.hawaii.edu
To: luau at videl.ics.hawaii.edu
cc:
Subject: Re: [luau] Saving in /home
On Monday, September 29, 2003, at 04:49 PM, tom_gordon at notes.k12.hi.us
wrote:
> If you aren't using Samba then the default file permission are taken
> from
> "umask" (env variable) subtracted from 777.
>
> you can set umask in /etc/bashrc and it might be set somewhere on the
> system also (~/bashrc)
>
> look for umask=177 which would be the culprit (022 is default on
> redhat).
I'm very green so you'll have to speak slowly. We are using Samba to
talk to our Windoze machines. How does this relate to umask?
So umask controls the permissions assigned to new files as they are
create right? How do I set umask in /etc/bashrc? Is it just like
editing a text file?
If I want the permissions assigned to new files to be 770 then I should
set the mask to 007 right?
_______________________________________________
LUAU mailing list
LUAU at videl.ics.hawaii.edu
http://videl.ics.hawaii.edu/mailman/listinfo/luau
More information about the LUAU
mailing list