LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-04-2005, 02:39 PM   #1
nephish
Member
 
Registered: Jun 2005
Distribution: arch, ubuntu
Posts: 456

Rep: Reputation: 30
can i create a user for only one directory.


hello there,
i am hosting a few websites for some friends.
i have one site that i want to give access to my friend to access to make changes, etc... but i only want him to have access to the directory that his page will be served from. I would like him to access it by ssh.
can i create a user account with a home directory of /var/www/his_web_directory ? So that he can ssh into his home directory and change things with his website. Would doing this create a security risk ? Next, who owns his files, or i mean if they belong to him, will user www be loading them from the internet? or will he have to chmod them or chown them somehow ?
thanks
 
Old 12-04-2005, 06:44 PM   #2
Mad Scientist
Member
 
Registered: May 2003
Posts: 167

Rep: Reputation: 30
I don't know about security risks, but you could certainly create a user with a home directory of /var/www/whateverdirectory . If the user already exists, you can use the usermod command, something like

Code:
usermod -d /var/www/whateverdirectory username
Just pay attention to your permissions, and know to what group this user belongs. You can have /var/www itself be readable/writeable only by root, and just change the user and group permissions on each directory within this hierarchy. Apache should be able to access all of that just fine, but you could change the group to "apache" if the default arrangement doesn't work.
 
Old 12-04-2005, 06:49 PM   #3
nephish
Member
 
Registered: Jun 2005
Distribution: arch, ubuntu
Posts: 456

Original Poster
Rep: Reputation: 30
cool thanks much
i think thats what i will do.
the user does not exist yet.
but will in about an hour
 
  


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
user home dir doesn't create when new user add dev_mohamed Linux - Software 3 01-12-2007 01:08 AM
create ftp user for vsftpd server without home directory cccc Linux - Networking 2 07-30-2005 06:32 AM
Unable to create directory as user technician Slackware 4 02-15-2004 01:28 AM
open webmail error "Can't create your user directory! 7/mail (No such file or directo ko_zlynn Linux - Networking 1 12-21-2003 04:00 AM
adding a new user doesn't create a home directory abrakadabra Linux - General 6 08-09-2002 08:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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