Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 240
  • Last Modified:

Configure FTP Directory

When I FTP to my SUSE 9.1, my default directory is \home\username.  How can I change my default directory to be /ftpdropbox which is directory off the root.

This is for outside users to send me files.


  • 2
2 Solutions
The easiest way would be to remove your home directory and replace it with a symlink to /ftpdropbox:

rm -rf /home/username
ln -s /ftpdropbox /home/username

make sure /ftpdropbox is accessible to the user in question. NOTE: this will work with vsftp - if you use any other FTP server it may depend on the server parameters whether it follows symlinks or not.

Another alternative is to change user's home directory completely, and you can do that by either editing /etc/passwd  or using

usermod -d /ftpdropbox username
go to /etc/passwd and change home directory of the user you are logging to the FTP server. The link thing mentioned before will not work with JAIL!
An example from /etc/passwd file

the /export/home/petrus is the HOME directory of petrus user and this is the directory you are changed to while you login to your FTP server.
don't forget to change privileges or owner chown youruser:users /destination/directory (optional - only if you will not be able to write to the dir)
>>The link thing mentioned before will not work with JAIL!<<

It works perfectly fine with my ~20 users right now. Would you care to explain why wouldn't it work?

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now