LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-13-2006, 08:22 PM   #1
nephish
Member
 
Registered: Jun 2005
Distribution: arch, ubuntu
Posts: 456

Rep: Reputation: 30
virtual users and virtual host need to stay at /home


lo there,
i have a quick question about setting up permissions on some home folders.
i have apache running with virtual hosts.
under /var/www/ i have several folders that some of my friends websites are located at.
so to allow them to modify their sites remotely, i set them up as users with their home directory being /var/www/whatever_their_site_folder_is.
this way they can use an ssh client and transfer files to their folder and apache will serve them to the web.
so far so good. But is there a way that i can keep them from also exploring around on the rest of my computer ? i want them not to be able to move up the directory tree any more than just their home ( or web ) folder.
i suppose i could alter their user permissions so they could not look at other stuff, but i dont know how. Is this where i would use a jail ?

thanks for any suggestions
 
Old 01-14-2006, 01:16 PM   #2
mjmwired
Member
 
Registered: Apr 2004
Distribution: CentOS6, CentOS5, F16, F15, Ubuntu, OpenSuse
Posts: 620

Rep: Reputation: 39
The best way to do this is to enable home directories and use ftp.

1. Enable home directories in Apache (/home/user/public_html)
2. Point virtual host directory parameters to their public_html
3. Enable an FTP server which will restrict access to their /home/user directory only.
4. *If* you still choose to give them SSH (or any shell access). Learn to use some sort of 'jail shell' which will appear as if their is nothing else on the system but their home directory.
 
Old 01-14-2006, 02:14 PM   #3
nephish
Member
 
Registered: Jun 2005
Distribution: arch, ubuntu
Posts: 456

Original Poster
Rep: Reputation: 30
jail shell, looks like what i need here, thanks much
 
Old 01-14-2006, 02:36 PM   #4
erimar77
Member
 
Registered: Jan 2006
Posts: 76

Rep: Reputation: 15
search around for the chroot command.. that should help point you in the right direction too
 
  


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
FTP virtual users with different home directories remi Linux - Software 14 07-27-2009 12:20 PM
vsftpd, web uploads, vsftpd virtual users, apache virtual hosts, home directories jerryasher Linux - Software 7 02-18-2007 07:29 AM
Virtual Host abridge Linux - Software 1 04-13-2005 08:35 AM
virtual host ziggie216 Linux - General 2 12-22-2003 07:38 PM
Virtual Host |Drakehash| Linux - Networking 0 07-17-2003 04:02 PM


All times are GMT -5. The time now is 09:31 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration