In this article, we discuss how to remedy the following error message in VSFTPD.
500 OOPS: vsftpd: refusing to run with writable root inside chroot()
- These instructions are intended specifically for solving the error:
500 OOPS: vsftpd: refusing to run with writable root inside chroot().
- We will be working from a Liquid Web Self Managed Fedora 32 server, and logged in as the root user.
How to Repair
This error may occur when attempting to connect to a vsftpd FTP server that is configured to jail (prevent from accessing other directories) each FTP user. It is best practice to create Linux users specifically for FTP, that can't log in via SSH. For example, if you wanted to remove SSH access for testuser, then you'd use the following command:
usermod -s /sbin/nologin testuser
However, that won't address the problem listed in the error. To do this, we must modify the user's home directory to read only. Assuming the username is testuser and the home directory is /home/testuser, then execute the following command:
chmod a-w /home/testuser
For good measure, be sure to restart vsftpd:
systemctl restart vsftpd
Alternatively, you can bypass the writable check in the vsftpd config file by running the following command.
echo 'allow_writeable_chroot=YES' >> /etc/vsftpd/vsftpd.conf && systemctl restart vsftpd
Trying to resolving errors like this can be frustrating at best. Liquid Web support has the knowledge and experience needed to address these issues quickly and reliably.
Should you run into an issue which requires our assistance, do not hesitate to give us a call at 800.580.4985, or open a chat or ticket with us.
We are standing by to help!
Our Sales and Support teams are available 24 hours by phone or e-mail to assist.