permissions problem - Linux question
Hello, I have an issue where two users read, write, create, and delete files to a specific directory. chmod the dir' with 777, however new files are not created with 777 perm's. For example; -rwxrwxrwx 1 herman users 0 Oct 21 09:58 test-1.txt -rwxrwxrwx 1 herman users 0 Oct 21 09:57 test-2.txt -rwxrwxrwx 1 postgres postgres 0 Oct 21 09:56 test-3.txt -rw-r--r-- 1 postgres postgres 679 Oct 21 09:59 new-test-4.txt -rwxrwxrwx 1 herman users 0 Oct 21 09:54 test-postgres.txt What can I do to make the all new files inherit 777 perm's and/or have all new files created inherit a specific group? Both users need to be able to completely interact with files regardless who creates them. Many thanks in advance. ~James
You want the directory to be setgid, so, chmod 2777 . This create any file in that directory to be created with the same groups perms. as the directory. Is that sufficient? Thanks, LDB On Fri, 21 Oct 2005 11:14:47 -0700, James D. Parra wrote
Hello,
I have an issue where two users read, write, create, and delete files to a specific directory. chmod the dir' with 777, however new files are not created with 777 perm's.
For example; -rwxrwxrwx 1 herman users 0 Oct 21 09:58 test-1.txt -rwxrwxrwx 1 herman users 0 Oct 21 09:57 test-2.txt -rwxrwxrwx 1 postgres postgres 0 Oct 21 09:56 test-3.txt -rw-r--r-- 1 postgres postgres 679 Oct 21 09:59 new-test-4.txt -rwxrwxrwx 1 herman users 0 Oct 21 09:54 test-postgres.txt
What can I do to make the all new files inherit 777 perm's and/or have all new files created inherit a specific group? Both users need to be able to completely interact with files regardless who creates them.
Many thanks in advance.
~James
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
Lawrence, On Friday 21 October 2005 11:37, Lawrence Bowie wrote:
You want the directory to be setgid, so,
chmod 2777 .
This create any file in that directory to be created with the same groups perms. as the directory.
No. It will be created with the same group ID as that of the directory. The file modes will still be established in the usual way, by the creating program as modified by the umask.
...
LDB
Randall Schulz
James D. Parra wrote:
Hello,
I have an issue where two users read, write, create, and delete files to a specific directory. chmod the dir' with 777, however new files are not created with 777 perm's.
For example; -rwxrwxrwx 1 herman users 0 Oct 21 09:58 test-1.txt -rwxrwxrwx 1 herman users 0 Oct 21 09:57 test-2.txt -rwxrwxrwx 1 postgres postgres 0 Oct 21 09:56 test-3.txt -rw-r--r-- 1 postgres postgres 679 Oct 21 09:59 new-test-4.txt -rwxrwxrwx 1 herman users 0 Oct 21 09:54 test-postgres.txt
What can I do to make the all new files inherit 777 perm's and/or have all new files created inherit a specific group? Both users need to be able to completely interact with files regardless who creates them.
Many thanks in advance.
~James
Files are created according to what "umask" is set to, "man umask" and have a play with different values. Regards Sid. -- Sid Boyce ... Hamradio License G3VBV, licensed Private Pilot Retired IBM/Amdahl Mainframes and Sun/Fujitsu Servers Tech Support Specialist Microsoft Windows Free Zone - Linux used for all Computing Tasks
participants (4)
-
James D. Parra
-
Lawrence Bowie
-
Randall R Schulz
-
Sid Boyce