LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-03-2004, 04:38 PM   #1
wedgeworth
Member
 
Registered: Aug 2003
Posts: 234

Rep: Reputation: 30
users writing in groups


what is the best way to ensure that all files in a given directory (recursive) are all written, reguardless of the user, with the same group ownership? i've got multiple users writing in a set of directories (recursive down as well) and i need to make sure they can all access these files. any help?


one particular user can't edit any files..yet he can download them, change them and then replace it by deleting the old one. crazy that he can delete a file...but now edit it directly.

Last edited by wedgeworth; 06-03-2004 at 04:40 PM.
 
Old 06-03-2004, 04:42 PM   #2
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
I don't know if I understand correctly, but I think you just want to...

chmod -R g+w *

That will change the files/directories to be group writable starting with the current directory all the way down. The -R means recursive.

Is that what you mean?
 
Old 06-03-2004, 06:13 PM   #3
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
You can also put the SETGID bit on the directory (chmod g+s directory). This ensures that all files created in that directory belong to the same group as the directory itself.
 
Old 06-04-2004, 09:16 AM   #4
wedgeworth
Member
 
Registered: Aug 2003
Posts: 234

Original Poster
Rep: Reputation: 30
can that be set recursively? can i set everything in that directory and the subsequent directories under it, and their files...and so on?
 
Old 06-04-2004, 10:19 AM   #5
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
Ya, use the -R option when you use chmod and all the existing files/folders will get the permission changes you set.
 
Old 06-04-2004, 10:27 AM   #6
wedgeworth
Member
 
Registered: Aug 2003
Posts: 234

Original Poster
Rep: Reputation: 30
drwxr-sr-x 2 root web 1024 Jun 4 10:32 test2



explain the "s"....is that just saying that everything that is created under here will have the same group as this directory? what exactly does the "s" mean? just wanted to double check. i've seen the "s" but i didn't ever know what it meant. does it give execute permissions since it's in the "execute" slot instead of the "x"? if i only want someone to be able to rw- but i have the group always set to web with rws...does that mean they have execute permissions. and vis versa what if i want to give them execute permissions and it's set as rws....do they have them?



i've also seen capital s..."S". what does that mean? what's the difference?


drwxr-Sr-x 2 root web 1024 Jun 4 10:32 test2

Last edited by wedgeworth; 06-04-2004 at 10:39 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
groups and users twb2005 Linux - Newbie 7 10-10-2005 07:21 PM
users and groups twb2005 Linux From Scratch 2 10-10-2005 02:47 PM
users and groups twb2005 Red Hat 1 10-10-2005 02:47 PM
users and groups Red Squirrel Linux - Newbie 2 02-22-2004 08:37 PM
users and groups krfulton Linux - Security 1 01-05-2004 04:43 AM


All times are GMT -5. The time now is 04:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration