Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

The goal: when a local user logs in to ftp, the user is directed to /home/{username}/htdocs. The expectation is that FileZilla or equivalent will show / and the contents of /home/{username}/htdocs below Like this:

/-
  -file1
  -file2
  |-dir1
  |-dir2

The closest I can get is to see / as /home/{username} and then its contents below.

/-
  |-htdocs
    |-file1
    |-file2
    |-dir1
    |-dir2

I have tried multiple variations on the configurations suggested by all the postings on vsftpd but none seem to get me where I want to go. Either one can't get there from here or I'm missing something.

I've pared vsftpd.conf to a minimum:

listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
dirmessage_enable=YES
use_localtime=YES
connect_from_port_20=YES
virtual_use_local_privs=YES
#chroot_local_user=YES
user_config_dir=/etc/vsftp/users

With /etc/vsftp/users containing a file named {username} containing

local_root=/home/{username}/htdocs

This doesn't get me where I want to go.

So, what am I missing?

[Note: this is in anticipation of no result to my question about proftpd earlier]

Thanks.

George

share|improve this question

1 Answer 1

up vote 0 down vote accepted

The answer is to install an earlier version of vsftpd!

I had originally just done an install of vsftpd and got versison 2.3.5. When I got the OOPS message about a writable root I made the user's home directory not writable, etc., ending up with the situation described above. Further research had me read more closely the commentary on solving the OOPS problem. One correspondent pointed out that the previous version of vsftpd did not have the constraint on writable roots. So I dug into the history files to find version 2.3.2. That version gives me the results I was looking for.

btw, I did try installing version 3.0.2 of vsftpd on my 32-bit virtual machine installation and got an error related to not finding 'crypt'. Since I was already in way over my head I did not try to resolve that error. Going backwards, in this case, was better than trying to go forwards.

g

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.