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.
What if the group is the same as the user?
I tried it and its not working
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
Correction:
I dont need to specify 107 for the group in /etc/passwd
remove that step
–MiguelV
pam_service_name=vsftpd
have you check for other user ?
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