Solved

Best FTP program to accomplish this setup

Posted on 2006-11-22
6
197 Views
Last Modified: 2013-12-15
I would like to have multiple users who after they login, get dumped into their  own folder...
For example.../Ftp would be the main directory and within in that we would have
/FTP/userA
/FTP/UserB

The user couldnt go higher up then their directory.  I didnt see this configuration possible with VSFTPD
Any Ideas?

0
Comment
Question by:akalbfell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 40

Expert Comment

by:noci
ID: 18001810
run the ftp daemon in a chroot jail and then
let it have it's own /etc/passwd file with it's own paths.
(ie the HOME of a user in the FTP jail is /FTP/userA for userA.)

0
 
LVL 14

Expert Comment

by:ygoutham
ID: 18003692
add this line to the vsftpd.conf

chroot_local_user=YES

restart vsftpd
that would put them in a chrooted jail.
0
 
LVL 8

Author Comment

by:akalbfell
ID: 18005755
ygoutham, what would determine what folder is that "jail"
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 8

Author Comment

by:akalbfell
ID: 18005882
because what im trying to accomplish is having multiple hosted websites on one box. the websites are setup like this..

/var/html/website1
/var/html/website2
/var/html/website3

if a person ftp's into ftp://website1.com it should bring them into the above directory. If another person ftp's into ftp://website2.com it would bring them into their home directory.
Since all names point to the same address, the username will determine which folder to drop them into.
0
 
LVL 14

Accepted Solution

by:
ygoutham earned 500 total points
ID: 18017268
the jail is the home folder specified for each user in the /etc/passwd file for every user.  you can always add users with a

useradd -d /some/home/folder someuser
passwd someuser

this puts the entry for the "someuser" as /some/home/folder for the specified user in /etc/passwd file

i would suggest adding a ftpuser account

groupadd someftpgroup

useradd -d /some/home/folder -g someftpgroup someuser
useradd -d /some/other/home -g someftpgroup someotheruser

now all the users created belong to a primary group "someftpgroup".  change ownership of all the folders in

/var/html

with the following

chgrp -R someftpgroup /var/html
chmod -R 775 /var/html

this ways all the users can do a ftp and upload and write into their home folder.  take a look at the "local_umask" in vsftpd.conf and change it accordingly to make all files uploaded to have 775 as the default permission so that the files may also be usable through the web browser. otherwise httpd which runs as "apache" user by default might not have read permissions and the pages might not be displayed.

but if you want to have different home directories than the html folders, then create symbolic links in the /var/html directory and the webpages might still be served...
0
 
LVL 8

Author Comment

by:akalbfell
ID: 18017322
Thanks, exactly the info i was looking for.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question