LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Create new account for website editing only (https://www.linuxquestions.org/questions/linux-newbie-8/create-new-account-for-website-editing-only-760031/)

andrewz 10-06-2009 07:10 AM

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!

avijitp 10-06-2009 07:18 AM

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.

freelinuxtutorials 10-06-2009 07:32 AM

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

andrewz 10-06-2009 05:18 PM

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?

lutusp 10-06-2009 05:27 PM

Quote:

Originally Posted by andrewz (Post 3710232)
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

avijitp 10-06-2009 09:04 PM

As mentioned earlier, you need to give permission/ownership recursively (-R) to all the files & directories under that directory.


All times are GMT -5. The time now is 07:47 PM.