1

I've installed Open Panel, which seems to ship with Pure FTP server. I added a linux user ftpuser, and now I can log in with it. I'd like to specify a directory to which this user starts with when it logs in.

How can I achieve this?

1 Answer 1

1

You can use a program like usermod with its -d option if you have that installed:

 usermod -d /new/ftpuserhome ftpuser

if you don't have that, you can also edit the /etc/passwd file as root and change the 6th field (the one before the last field (: is the field separator).

2
  • Thanks. Actually I did this in fact, but I thought that I don't have to specify a home directory as a directory where ftp connection leads a user to when initializated (i.e. I thought there is possibility for different home dir e.g. when logged in to the shell, and ftp starting dir)?
    – forsberg
    Jan 8, 2015 at 10:07
  • 1
    @forsberg AFAIK there is for virtual users only (there has to be of course), but since you indicated the linux user ftpuser, IMO this is the solution. I don't know what happens if you specify both, but I assume the virtual user info would prevail. That might however become an update nightmare if you forget to sync passwords between /etc/shadow and /etc/pureftpd.passwd, as there is no fall-through mode for looking up information.
    – Anthon
    Jan 8, 2015 at 10:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .