Learn how to a build a cloud-first strategyRegister Now

x
  • 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.

Thanks

0
oceansupport
Asked:
oceansupport
  • 2
2 Solutions
 
m1tk4Commented:
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
0
 
karelrambousekCommented:
Hello,
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
petrus:x:503:100::/export/home/petrus:/bin/bash

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)
-K-
0
 
m1tk4Commented:
>>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?
0

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