[SLE] save as -rw-rw-rw {whoever} users???
Hello, I am trying to create a folder where all users can read-write. I have created /usr/sharedfiles and changed the permissions as such drwxrxrwx 2 root users 1024 Jan 27 16:09 . drwxrxrwx 2 root users 1024 Jan 23 05:36 .. -rw-rw-rw- 1 root users 62 Jan 22 08:28 .signature -rw-r--r-- 1 george users 73 Jan 27 16:08 trash.txt I have successfully setup ".signature" so that it can be read-write by all users, but I then saved ".signature" as "trash.txt" while user "george" for a test. Now my other users can't write to "trash.txt" file. Is there anything I can do, so that all saved files are saved as -rw-rw-rw 1 {whoever} users Thanks George -- My personel website http://www.firstnethou.com/gz/welcome.htm -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Hi, On Thu, Jan 27, 2000 at 15:40 +0300, George Zeigler wrote:
I have successfully setup ".signature" so that it can be read-write by all users, but I then saved ".signature" as "trash.txt" while user "george" for a test. Now my other users can't write to "trash.txt" file. Is there anything I can do, so that all saved files are saved as -rw-rw-rw 1 {whoever} users
Set you umask accordingly: umask 000 Ciao, Stefan -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
George Zeigler wrote:
Hello, I am trying to create a folder where all users can read-write. I have created /usr/sharedfiles and changed the permissions as such drwxrxrwx 2 root users 1024 Jan 27 16:09 . drwxrxrwx 2 root users 1024 Jan 23 05:36 .. -rw-rw-rw- 1 root users 62 Jan 22 08:28 .signature -rw-r--r-- 1 george users 73 Jan 27 16:08 trash.txt
I have successfully setup ".signature" so that it can be read-write by all users, but I then saved ".signature" as "trash.txt" while user "george" for a test. Now my other users can't write to "trash.txt" file. Is there anything I can do, so that all saved files are saved as -rw-rw-rw 1 {whoever} users
The answer is both yes and no. When a file is created it is usually with permissions of 0666 or rw for everybody but then bits are removed using the umask which is usually 0022 or perhaps 0002 so that the final permission is either 0644 or 0664. The umask is setable but it is set for a process and inheritted. So while you can do what you want you can't do it for just that directory. What you can do is to write wrappers so that they set the umask and then execute the command that you want, off the top of head: #!/bin/sh cmd=$1 shift umask 0 exec $cmd ${1+"$@"} It really needs a usage but I hope that you get the jist of it. /Michael -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
participants (3)
-
genz1968@mtu-net.ru
-
Michael.Salmon@uab.ericsson.se
-
stefan.troeger@wirtschaft.tu-chemnitz.de