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:

username:x:100:200::/ftp/directory:/sbin/nologin
(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
    user:x:1002:1002::/ftp/folder1:/bin/false

    to
    user:x:1002:107::/ftp/folder1:/bin/false

    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
    drwx—–x

    –MiguelV

  2. 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 *