LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 09-02-2003, 04:29 PM   #1
phil1076
Member
 
Registered: Oct 2001
Location: Grand Cayman
Distribution: RH 9.0
Posts: 96

Rep: Reputation: 16
Permissions question...


Ok, let's say I have a directory called "software".

I want joe, frank, and mike to be able to r/w/x the directory and I want mark, phil, and steve to only be able to r/x the directory. I want everyone else to not be able to see anything...how would I do this?

group1 = joe, frank, mike
group2 = mark, phil, steve
owner=root


"chgrp group1 software"
"chmod 770 software" gives me what I want for group1
-------------------------------------------------------------------------
"chgrp group2 software"
"chgrp 750 group2 software" gives me what I want for group2

How do I combine the two? Thanks in advance.
 
Old 09-02-2003, 10:08 PM   #2
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,560

Rep: Reputation: 182Reputation: 182
"How do I combine the two?"

I do not know for sure that this will work, but it is easy enough to try:

Create a symbolic link to software:
ln -s software softalias

then try:
chgrp group2 softalias
chgrp 750 group2 softalias
 
Old 09-03-2003, 09:54 AM   #3
phil1076
Member
 
Registered: Oct 2001
Location: Grand Cayman
Distribution: RH 9.0
Posts: 96

Original Poster
Rep: Reputation: 16
yt

I tried it but any permission changes on the soft link would not affect the link, but instead the destination.

A chgrp on the soft link actually changed the permissions on the software directory, not the link itself.

It doesn't seem like it can be done..
 
Old 09-03-2003, 10:50 AM   #4
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
I really don't know if this will work... just a thought I might mention it:

Create another directory at the same level. Maybe something like /software_read

#################################

chown root.group1 /software
chown root.group2 /software_read

chmod -R 770 /software
chmod 750 /software_read

cd /software_read

find /software -exec ln -s {} \;

find /software -type f -exec chmod 774 {} \;
find /software -type d -exec chmod 775 {} \;


#################################

The idea is this: prevent anyone other than the owner and group from entering the respective directories. Then, you "copy" the directory contents by symlinking everything. The final two steps allow "other" users to read the files. Since the only two groups that can see the files are group1 and group2 (because the top-level directory permissions prevent anyone else from having access), "other" for these directories and files means: group2.

Does that make sense? Again, I haven't tried it... It was just a thought. Also, it makes maintenance a pain in the arse because you have to update the contents of /software_read repeatedly (daily, hourly, or whatever it is you need).

EDIT:
The commands above would have to me modified slightly. You would need to recreate the subdirectories of /software. The symlinking find command wouldn't do that for you... slight oversight on my part...

Last edited by Dark_Helmet; 09-03-2003 at 10:53 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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about permissions UnforgotteN Linux - Distributions 6 05-18-2005 08:51 PM
Permissions question: what does the Thaidog Linux - General 7 03-29-2005 10:16 PM
Permissions question sammckee Linux - Newbie 3 09-23-2003 10:55 AM
Permissions Question? gsmonk Linux - General 3 08-27-2003 03:30 PM
Permissions Question jkraeger Linux - General 1 02-25-2003 10:54 AM


All times are GMT -5. The time now is 04:53 AM.

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