I have a vsftp server that services a read-only public space by anonymous login. It works fine. I need to add a few specific users that will authenticate by username/password and they will have different user-specific home directories that are also read-only.

I have configured virtual guest users and they can log in (authenticating via PAM). The problem that I have is that these users can only access world-readable files. I don't want to make the files world-readable – they are all owned and accessible by the nobody user and they have no group or world permissions.

I have configured vsftp so that it runs as nobody and so that the guest user name is nobody – I would have expected that this meant all guests were 'nobody' and should therefore be able to read files accessible to nobody.

The configuration that I added for virtual users is below

 # Specific users

An example home directory (listed from the filesystem):

drwx------ 2 nobody nobody 4096 May 15 12:09 a_directory
drwx------ 5 nobody nobody 4096 May  7 12:07 another_directory
-rw------- 1 nobody nobody  95744 May  4 17:07 FILE.txt
-rw------- 1 nobody nobody 104502 Apr 22 17:14 another_file

How do I configure vsftp so that virtual users can see the files in their directories ?

  • Who owns the user's directory? That is, while cd'd into the directory containing a_directory, what do you get from ls -ld .? – Warren Young May 15 '13 at 13:36
  • This is the directory /srv/backup/myuser: drwx------ 7 nobody nobody 4096 May 15 12:02 – starfry May 15 '13 at 13:57
  • In that case, I suspect you will find your answer in vsftpd's log file. – Warren Young May 15 '13 at 14:30
  • 'fraid not. I have already exhausted that source of information I have both xferlog_enable=YES and log_ftp_protocol=YES but it does provide any further enlightenment. I found to list the contents of a directory it needs 504 permissions and to download a file it needs 404 permissions. – starfry May 15 '13 at 16:30
  • I've given up and am using proftpd instead :) – starfry May 17 '13 at 19:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.