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.
Question about setting FTP User root folder
Moderator: General Moderators
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
You could try changing the DefaultRoot setting:
Code: Select all
DefaultRoot ~/public_html/some_dirYou 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.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
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.
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.
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.
http://ubuntu.wordpress.com/2005/10/28/ ... ing-sshfs/ if your on linux
or
http://www.sftpdrive.com/ if your on windows.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
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.
(#10850)
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
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.