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 10-06-2009, 07:10 AM   #1
andrewz
LQ Newbie
 
Registered: Jan 2007
Location: Chicago
Distribution: rhel3, rhel4, centos3, centos4
Posts: 8

Rep: Reputation: 0
Create new account for website editing only


Hi,
I am using a VPS that is running redhat. So far I only have the root user and my own user that have all permissions. I am working with a web site developer and I want to create a new user account that can modify only a couple directories within the /var/www/html directory. I don't want them to have access to the database or other directories that have live websites where they could mess something up by accident. What is the best way of doing this?

thanks!
 
Old 10-06-2009, 07:18 AM   #2
avijitp
Member
 
Registered: May 2005
Location: India
Distribution: FC11, Debian/Ubuntu, RHEL, Solaris, AIX, HP-UX
Posts: 161

Rep: Reputation: 32
If the username is usera, then you can give usera ownership and write access to only those directory under /var/www/html

chown usera:usera /var/www/html/usera
chmod 755 /var/www/html/usera


As a root user you would always have full access to these directories.
 
Old 10-06-2009, 07:32 AM   #3
freelinuxtutorials
Member
 
Registered: Oct 2009
Posts: 70

Rep: Reputation: 21
for ftp , you can jail or chroot a user to a particular directory.
you need to create a group with a certain permission and use chown
 
Old 10-06-2009, 05:18 PM   #4
andrewz
LQ Newbie
 
Registered: Jan 2007
Location: Chicago
Distribution: rhel3, rhel4, centos3, centos4
Posts: 8

Original Poster
Rep: Reputation: 0
Ok I ran these following commands:

chown usera:usera /var/www/html/usera
chmod 755 /var/www/html/usera

however, I already have files in that directory. I am assuming they also need to have permissions corrected? Can they all be changed to usera also?
 
Old 10-06-2009, 05:27 PM   #5
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by andrewz View Post
Ok I ran these following commands:

chown usera:usera /var/www/html/usera
chmod 755 /var/www/html/usera

however, I already have files in that directory. I am assuming they also need to have permissions corrected? Can they all be changed to usera also?
For an entire directory, including files:

Code:
# chown usera:usera -R /path
-- and --

Code:
$ man chown
 
Old 10-06-2009, 09:04 PM   #6
avijitp
Member
 
Registered: May 2005
Location: India
Distribution: FC11, Debian/Ubuntu, RHEL, Solaris, AIX, HP-UX
Posts: 161

Rep: Reputation: 32
As mentioned earlier, you need to give permission/ownership recursively (-R) to all the files & directories under 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
Editing Sessions Startup programs from a different user account phrozenfearz Ubuntu 3 03-14-2007 07:16 PM
Account editing in Evolution Thulemanden Linux - Software 2 01-29-2006 12:23 PM
Create FTP account Swakoo Linux - Newbie 1 06-13-2005 06:16 AM
cannot create new user account kpachopoulos Linux - Newbie 4 08-17-2004 07:38 AM
editing user account cjergl LQ Suggestions & Feedback 3 11-01-2001 12:33 AM


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