LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 07-17-2006, 09:12 AM   #1
Harlin
Member
 
Registered: Dec 2004
Location: Atlanta, GA U.S.
Distribution: I play with them all :-)
Posts: 316

Rep: Reputation: 38
Setting Directory Permissions


I have about 20 users on a Redhat box. Each user has its own group (which I believe Redhat does this by default when you set up a user). All of these users belong in the same group as the owner of the shared directories.

There are two shared directories. Whenever any of these users put something into these shared directories the files still belong to the original user.

Without changing the primary groups of the users, how can I set up the shared directories to change group ownership of any file/subdir placed in them to where it belongs to the group of the shared directories owner?
 
Old 07-17-2006, 11:40 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Are these directories, or samba shares? Are they subdirectories on a partition, or is each a mountpoint for a respective partition.

If they are samba shares, you can use the "force group" option.
If they are mount points for individual partitions, an they use a certain filesystem, then you could use the mount option "gid=".

If what you want to do is allow certain groups access, you could use the "setfacl" command to create a default group and permissions for the directory. Then files created in the directory will inherit the ACLs.

Some filesystems may support the grpid option. If the directory has the setgid bit set, files created in them will inherit the group ownership.

Last edited by jschiwal; 07-17-2006 at 11:41 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
setting directory permissions at start redrobin77 Fedora 1 11-05-2005 02:26 PM
trouble setting directory permissions goodolday Linux - General 1 04-26-2005 05:06 PM
Need help setting permissions for a directory imsam Linux - Newbie 6 12-08-2004 11:37 AM
Setting permissions for directory ch4s3r Linux - Software 5 08-19-2004 04:37 PM
Setting Directory Permissions is Hard ! dpaille Linux - General 1 12-12-2002 02:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 03:22 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
Open Source Consulting | Domain Registration