LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 11-20-2007, 09:59 AM   #1
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Rep: Reputation: 73
Permissions on a Share Server?


I need help with permissions on a RHEL4 ES server. Right now I have a simple directory called "/share/security"

Code:
[root@fback security]# ls -la
total 1604
drwxrwx---  3 root       security     4096 Nov 20 09:21 .
drwxrwsr-x  7 root       root         4096 Nov  1 09:48 ..
-rwxrwx---+ 1 jon        jon         67072 Nov 20 09:20 newuser.txt
-rwxrwx---  1 jill       jill       66175 Nov 13 10:24 timesheet.txt
-rwxrwx---  1 jill       security   663861 Nov 15 08:39 pics.txt
-rwxrwx---+ 1 jon        jon        158720 Nov 20 09:21 data.txt
-rwxrwx---+ 1 jill       security   613888 Nov 16 14:17 info.txt
Now I only have two people I want to have access to this directory (/share/security) and I want two simple things. When a user creates a file in /share/security, the ownership is *:security and the permissions always remain 770 in the /share security folder.

Above * = the user creating or changing the file.

Is this hard to do?
 
Old 11-20-2007, 10:44 AM   #2
wolfperkins
Member
 
Registered: Oct 2007
Location: Val-des-Monts, Québec, Canada
Distribution: CentOS, RHEL, Fedora
Posts: 109

Rep: Reputation: 16
This is highly dependent on the user environment. umask controls what default permissions get assigned to a filesystem object. Also, by default, a file/folder you create gets the ownership assigned to you with your current group. To use a different group one must issue the newgrp command.

The easiest for you would be to have a cron job as root that automatically resets permissions on your folder and run it often.
 
Old 11-20-2007, 11:11 AM   #3
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Original Poster
Rep: Reputation: 73
I would think we could add some kind of sticky bit to the group permission or something, no? This way it will never over ride the group ownership to something other than "security" and the 770 I would assume we could do some kind of umask...
 
Old 11-20-2007, 01:52 PM   #4
scotlarsen
Member
 
Registered: Sep 2006
Posts: 35

Rep: Reputation: 15
chmod g+s /path_to_directory
 
Old 11-20-2007, 02:11 PM   #5
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Original Poster
Rep: Reputation: 73
Quote:
Originally Posted by scotlarsen View Post
chmod g+s /path_to_directory
Yes - I actually tested this before you posted it and it works but thanks for letting me know!

Now I am only trying to see how to force 770 permissions on any file or directory under /share/whatever for any user that post in that directory.
 
  


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
Permissions On A SMB Share carlosinfl Linux - General 1 08-31-2007 02:29 PM
Permissions on NFS Share IwantLINUX Linux - Newbie 2 03-09-2007 06:03 AM
Samba share permissions anorman Linux - Software 1 10-22-2005 03:49 AM
File share permissions squib Linux - Newbie 1 09-21-2004 10:45 PM
Samba Share Permissions stever Linux - Newbie 4 05-17-2003 03:26 AM


All times are GMT -5. The time now is 06:00 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration