Getting past VSFTP’s 500 OOPS: cannot change directory

This is a frustrating one. Make sure that the user you are connecting as and the target directory have both the same user as well as group permissions.

For example, if you are chroot jailing a particular user, given this entry from /etc/passwd:

(where 100 = “username” and 200 = “somegroup”)

Make sure that the user and group permissions of the directory match what is set in /etc/passwd:

$ ls -lah /ftp/directory
drwxrwx--- 4 username somegroup 4.0K Mar 24 23:56 .

Posted this one since I’ve probably solved it, and then promptly forgotten the solution, at least three times.

5 thoughts on “Getting past VSFTP’s 500 OOPS: cannot change directory

  1. Got it.

    For a user with home folder /ftp/folder1

    i changed in /etc/passwd


    107 is the group for “ftp” account

    where i have specified in /etc/vsftpd.conf

    pam_service = ftp

    last but not least i make sure that this user has execute only permissions in the parent /ftp/ folder


  2. Correction:

    I dont need to specify 107 for the group in /etc/passwd
    remove that step


  3. I have this problem but the home directory was deleted , I create a new directory and all ok , so check first if exist the directory home

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.