LinuxQuestions.org
Visit Jeremy's Blog.
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 01-18-2003, 12:53 AM   #1
zolo44
LQ Newbie
 
Registered: Apr 2002
Location: Palmdale, CA
Posts: 13

Rep: Reputation: 0
How to give access...


I have a question for you guys... I'm new at this so bare with me.

How would I give access to a user to some files that are not under his home directory? for example: I want to give user1 access to everything under /var/www/ but nothing above it?

I'm using RH 8.0

Thanks in advance.
 
Old 01-18-2003, 03:30 AM   #2
hfawzy
Member
 
Registered: Aug 2002
Location: Egypt
Distribution: Debian Sarge, Slackware 10.0
Posts: 163

Rep: Reputation: 30
Code:
su root
cd /var/www/
chown -R user1 *
This will make `user1` the owner for the directories that are under /var/www/. So, he will have full permissions...

Hope that helps,
hfawzy
 
Old 01-18-2003, 12:39 PM   #3
zolo44
LQ Newbie
 
Registered: Apr 2002
Location: Palmdale, CA
Posts: 13

Original Poster
Rep: Reputation: 0
Great that worked. Thanks for you help. Just one more question... How about if I want to give access to more than one? Hope it is not to difficult to explain.

Thanks, zolo
 
Old 01-18-2003, 01:06 PM   #4
mhearn
LQ Guru
 
Registered: Nov 2002
Location: Durham, England
Distribution: Fedora Core 4
Posts: 1,565

Rep: Reputation: 47
Create a group, if you have a decent distro they'll provide a users/groups gui tool, i know redhat does. Otherwise use groupadd.

Then edit /etc/group, find the group you just added and add the user names of the people in that group to the end of the line.

Then do

chown -R you.newgroup thedirectory

That'll mean you own the directory, but it's in the group you just created. Now you can control permissions separately for the user (ie, you) and the group, so if you want the other members of the group to have read only access you can do that. For read/write do

chmod -R g+rw thedirectory/

a+rw is all, g+rw is group, o+rw is owner.
 
Old 01-18-2003, 05:53 PM   #5
zolo44
LQ Newbie
 
Registered: Apr 2002
Location: Palmdale, CA
Posts: 13

Original Poster
Rep: Reputation: 0
Perfect! thanks alot.
 
  


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
how to give apache root access Roll Linux - Software 2 03-02-2005 08:55 AM
WinXP give me some net access BACompTech Linux - Networking 2 09-22-2004 02:30 PM
Give Access extremebfn Linux - Networking 6 08-31-2004 04:27 AM
give user SU to access evrything? OverrRyde Mandriva 8 08-05-2004 02:58 PM
Give certain users more access to resources tearinox Slackware 2 05-21-2004 03:44 AM


All times are GMT -5. The time now is 06:36 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