LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   virtual users and virtual host need to stay at /home (https://www.linuxquestions.org/questions/linux-networking-3/virtual-users-and-virtual-host-need-to-stay-at-home-403111/)

nephish 01-13-2006 07:22 PM

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

mjmwired 01-14-2006 12:16 PM

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.

nephish 01-14-2006 01:14 PM

jail shell, looks like what i need here, thanks much

erimar77 01-14-2006 01:36 PM

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


All times are GMT -5. The time now is 04:57 PM.