Page 1 of 1
Question about setting FTP User root folder
Posted: Sun Apr 09, 2006 1:10 am
by RobertGonzalez
My dedicated server (Linux Fedore Core 2) uses ProFTPD 1.2.10. I want to set up a domain for testing development projects and allow users FTP access to certain folders that are under public_html for this domain (essentially making sub accounts for this domain). Is there a way in Linux to set an FTP users root folder to something other than the public_html folder?
As always, any help is much appreciated.
Posted: Sun Apr 09, 2006 10:34 am
by neophyte
I've never attempted it but, I'm interested in hearing the solution.
I can offer a guess.
Because PAM handles authentication, your answer may be there and not in the proftd conf file.
Posted: Sun Apr 09, 2006 10:42 am
by Chris Corbyn
You could try changing the DefaultRoot setting:
Code: Select all
DefaultRoot ~/public_html/some_dir
Posted: Sun Apr 09, 2006 12:32 pm
by Benjamin
You have to edit the proftpd conf file located in /etc/. Another solution is to create a new Linux account with the specified home directory, then login as that user. I can't be any more specific as I have never done this, I usually mount remote drives on my local filesystem using either ssh or samba.
Posted: Sun Apr 09, 2006 11:57 pm
by RobertGonzalez
I looked in /etc/ and found no proftpd.conf. In fact, I can't seem to find proftp anything. I found one lftp.conf and a few vsftp items. Do you think my host is using a different FTP server than ProFTP?
EDIT: Google is my friend. I found a bunch of information on the "Very Secure FTP Server" AKA vsftp. I think that ProFTP is indeed NOT on my server, but instead, VSFTP.
Posted: Mon Apr 10, 2006 1:13 am
by Benjamin
If you would find it easier to mount it locally, try..
http://ubuntu.wordpress.com/2005/10/28/ ... ing-sshfs/ if your on linux
or
http://www.sftpdrive.com/ if your on windows.
Posted: Mon Apr 10, 2006 1:53 am
by Christopher
I have found that the simplest way to do this is to create symbolic links in the public_html directory that point into the user's home directory. That way the user accounts are configured normally and I can easily add, remove or move the symbolic links as needed. I hate having to learn configuration for yet-another-FTP-server, so symbolic links are the easy way to solve the problem from the other direction.
Posted: Mon Apr 10, 2006 2:51 am
by RobertGonzalez
I think there is a way to do this using the configuration file. There is a directive that mentions how to automatically chmod a user when they login. But there is nothing that talks about how to keep a user locked into a certain root. I am totally new at Linux so this is all Greek to me. I'll figure it out sooner or later though. Thanks for all the help.