LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 02-24-2005, 10:11 AM   #1
Sillysoft
LQ Newbie
 
Registered: Mar 2004
Posts: 11

Rep: Reputation: 0
Linux permission help


Im on Fedora Core 2 and fairly new to the group functions in linux. Basically I need to create a main folder with many sub folders inside the main folder. I need to give full read,write access to one account on the main and sub folders. Then I need to give read,write access to different accounts for different sub folders. So how would I go about doing that? Each account needs to have their own sub folder but I also need one main account that has full read write access to the main and sub folders as well. Would I create one group and give full read,write access for that group for all folders and then give individual accounts full read.write access to their appropriate sub folders along with the main group permissions?

Thanks
Silly
 
Old 02-24-2005, 12:02 PM   #2
tangle
Senior Member
 
Registered: Apr 2002
Location: Arbovale, WV
Distribution: Slackware
Posts: 1,761

Rep: Reputation: 78
Are you saying that you wnat one user to have read/write permissions for the directory and all sub directories? Then have a read/wirte permissions for a single group for each sub-directory? Then have no access for world (everyone else)? If so you can do this.

chmod -R 770 <directory> This will give the user and group read/write access.
chown -R root <directory> This will set root as the owner for all sud-directories and file in the parent directory.

then cd into the directory. You will need to do this for each directory.
chown -R :<group name> <directotry> This will set the group to all sub-directories and and file.

If you want MS like permissions where multiable groups and users ave different permissions for the same directories check out this link.
http://www.linux-mag.com/2004-11/guru_01.html
 
Old 02-24-2005, 01:56 PM   #3
Sillysoft
LQ Newbie
 
Registered: Mar 2004
Posts: 11

Original Poster
Rep: Reputation: 0
I think it is the other way around. I need a group to have read write access to main folder and sub folders. Then for each sub folder I want to specify a single user account to have read/write access to that specific sub folder. Basically Im setting up a web server for a website. different people will be logging in to access their sub folders to edit their files, but I also need one main account that has read/write access to all folders.

Example:

folder a
subfolder b

account x
account y

subfolder b is located in folder a. account x should have full access to folder a and subfolder b. account y should only have full access to subfolder b.

I thought the solution would be account x is a group and account y is a single account. Is that a correct way of doing it?

Thanks
Silly
 
Old 02-24-2005, 07:16 PM   #4
tangle
Senior Member
 
Registered: Apr 2002
Location: Arbovale, WV
Distribution: Slackware
Posts: 1,761

Rep: Reputation: 78
Quote:
Originally posted by Sillysoft
Example:

folder a
subfolder b

account x
account y

subfolder b is located in folder a. account x should have full access to folder a and subfolder b. account y should only have full access to subfolder b.

I thought the solution would be account x is a group and account y is a single account. Is that a correct way of doing it?

Thanks
Silly
K, now I understand.

chmod -R 770 foldera Give r/w to user and group
chown y:x subfolderb Give user y r/w and group x r/w

I would say that is the way to do it.
 
  


Reply



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
Can't access my linux share through samba. I get permission denied. mlsbraves Linux - Software 1 08-16-2005 07:59 PM
Writing permission for windows and linux partitions jaakkop Slackware 3 07-25-2005 06:14 AM
linux permission yazdan Linux - Software 13 09-27-2004 05:40 AM
Win/Linux shared partition permission problems Ice Dragon Linux - Newbie 3 03-19-2004 05:52 PM
Permission for files created in NT for Linux use strik3r Linux - General 1 02-25-2004 04:05 AM

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

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

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