Hi.
I have a hack that sets the usmak for users in /etc/bashrc
umask -S u=rwx,g=rwx,o=r
The problem with this is that at logon it echo's "u=rwx,g=rwx,o=r" out. This breaks things like scp . What is the correct umask . I have read a number of doc's on this and still can't seem to get it correct. Please help .
Thanks
Once upon a time, Gregory Machin gdm@linuxpro.co.za said:
I have a hack that sets the usmak for users in /etc/bashrc
umask -S u=rwx,g=rwx,o=r
The problem with this is that at logon it echo's "u=rwx,g=rwx,o=r" out.
You are telling umask to print the value with the "-S". Take it out.
I will say that is a rather odd umask value.
On Tue, Mar 15, 2011 at 1:03 PM, Gregory Machin gdm@linuxpro.co.za wrote:
Hi.
I have a hack that sets the usmak for users in /etc/bashrc
umask -S u=rwx,g=rwx,o=r
A umask is back-to-front, so don't you want something like this in /etc/skel/bash.profile umask 077
That means, the user has full rwx, everyone else (including group) has nothing.
-c
Hi. found the info I needed to get it correct
http://en.wikipedia.org/wiki/Umask
0 – read, write and execute 1 – read and write 2 – read and execute 3 – read only 4 – write and execute 5 – write only 6 – execute only 7 – no permissions
so I ended up with umask 003
Thanks
On Tue, Mar 15, 2011 at 4:09 PM, Chris Adams cmadams@hiwaay.net wrote:
Once upon a time, Gregory Machin gdm@linuxpro.co.za said:
I have a hack that sets the usmak for users in /etc/bashrc
umask -S u=rwx,g=rwx,o=r
The problem with this is that at logon it echo's "u=rwx,g=rwx,o=r" out.
You are telling umask to print the value with the "-S". Take it out.
I will say that is a rather odd umask value.
-- Chris Adams cmadams@hiwaay.net Systems and Network Administrator - HiWAAY Internet Services I don't speak for anybody but myself - that's enough trouble. -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
On Tue, Mar 15, 2011 at 2:54 PM, Gregory Machin gdm@linuxpro.co.za wrote:
so I ended up with umask 003
Just to make sure you want it, this means everyone can read everyone else's data.
It's equal to 774.
-c
On Monday, March 14, 2011 11:00:10 PM Chris Smart wrote:
On Tue, Mar 15, 2011 at 2:54 PM, Gregory Machin gdm@linuxpro.co.za wrote:
so I ended up with umask 003
Just to make sure you want it, this means everyone can read everyone else's data.
It's equal to 774.
-c
the default is 022 with what you have set directories will not be accesable to people uing the other permissions
on a default setup home dirs are created with 700 so only the user can enter and all the files inside are not accesable by anyone. with user groups even if the directory is group readable and writeable no one will be able to access it but the user. im assuming that you have some users sharing a group and want them to share data. your probably best going for a umask of 002 unless you really want to make sure that other cant access anything in which id use 007 anyway it a bit hard to say how best to do it without any context.
Dennis
On 15Mar2011 16:54, Gregory Machin gdm@linuxpro.co.za wrote: | found the info I needed to get it correct | http://en.wikipedia.org/wiki/Umask
"man 1 umask" should get you info also. You may need to follow up with "man 2 umask" and/or "man 3 umask".
| 0 – read, write and execute | 1 – read and write | 2 – read and execute | 3 – read only | 4 – write and execute | 5 – write only | 6 – execute only | 7 – no permissions | so I ended up with umask 003
I use 002 myself; if I make an executable publicly readable I generally intend execute as well.
Cheers,
Once upon a time, Gregory Machin gdm@linuxpro.co.za said:
Hi. found the info I needed to get it correct
You already had a valid (if somewhat odd) umask set, you didn't have to convert it to the numeric value. "umask u=rwx,g=rwx,o=r" is a valid command. Like I said; you just needed to remove the "-S" that told the command to print out the symbolic value.