LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-18-2022, 04:02 AM   #1
karkator
LQ Newbie
 
Registered: May 2022
Posts: 1

Rep: Reputation: 0
Exclamation 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 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
Quote:
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
Quote:
local_root=/logs
write_enable=YES
Here is the output of ls in the root directory for . and ..
Quote:
$ 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
Quote:
cd /
chmod 755 .
Is there any other way or some other configuration changes I can do to achieve ftp connection without touching the file permissions in the root directory? As I need to protect my file systems.
 
Old 05-26-2022, 07:14 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
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 touching the file permissions in the root directory? As I need to protect my file systems.
AFAIK all the directories from / down to the ftproot directory (/logs in your case), should have the execute bit on (meaning they should have 755 permissions), in order for the ftp directory to be searchable by the ftp server.
Same as the docroot for a webserver

Regards
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] debian wheezy / vsftpd / 500 OOPS cannot change directory virgilinfo Linux - Server 12 01-04-2016 10:25 AM
vsftpd 500 OOPS: cannot change directory Rize Linux - Server 3 10-15-2014 03:53 AM
vsftpd 500 OOPS: cannot change directory ratcateme Linux - Software 4 05-21-2008 05:14 PM
i got a problem with vsftpd in F7, 500 OOPS: cannot change directory:/home/ftp-docs hosanna Fedora 1 05-25-2007 09:17 PM
Vsftpd - 500 OOPS: Cannot change directory amon Linux - Networking 3 05-31-2006 11:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration