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

oceansupportAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.