virtual users and virtual host need to stay at /home
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 ?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.