'VSFTPD 500 OOPS: cannot change directory:/logs
I am getting error "500 OOPS: cannot change directory:/logs" while using file zila client to access this directory. My linux kernel version is "4.9.11". I have created a user called as "log_user" which corresponds to "/logs" directory. This custom user I have created this by using my custom yocto layer which corresponds to "rocko" version. Below is my "vsftpd.conf" file
listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
pam_service_name=vsftpd
userlist_deny=NO
userlist_enable=YES
use_localtime=YES
chroot_local_user=YES
allow_writeable_chroot=YES
tcp_wrappers=YES
local_enable=YES
userlist_file=/etc/vsftpd.user_list
virtual_use_local_privs=YES
user_config_dir=/etc/vsftpd/user_config/
Below is my /etc/vsftpd/user_config/log_user file
local_root=/logs
write_enable=YES
Here is the output of ls in the root directory for . and ..
$ ls-als /
4 drwxrwx--- 23 root netdev 4096 Jan 1 1970 .
4 drwxrwx--- 23 root netdev 4096 Jan 1 1970 ..
The /logs directory has 755 permissions. I have found one hack that is if I manually give the below command in the root directory ftp works like magic !
cd /
chmod 755 .
Is there any other way or some other configuration changes I can do to achieve ftp connection without doing the chmod 755 . in the root directory ?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|