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()
Preflight Check
- 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
Alternative Fix
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
Act Quickly!
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!
Related Articles:
About the Author: J. Mays
As a previous contributor, JMays shares his insight with our Knowledge Base center. In our Knowledge Base, you'll be able to find how-to articles on Ubuntu, CentOS, Fedora and much more!
Our Sales and Support teams are available 24 hours by phone or e-mail to assist.
Latest Articles
How to Clone a Drupal Site to Another Domain
Read ArticleTop Eight Virtualization Security Issues and Risks
Read ArticleAccessing Man Pages on Ubuntu 16.04 LTS
Read ArticlePremium Business Email Pricing FAQ
Read ArticleMicrosoft Exchange Server Security Update
Read Article