By derekrynd
Command: STOR phase1.php Response: 150 Ok to send data. Response: 451 Failure writing to local file. Error: File transfer failed
I’m using FileZilla, and had no issues without using SFTP for the last several days. After performing consecutive uploads with bug fixes it gives me the error above. I have no idea what to do anymore.
I’ve the done following:
Nothing seems to be working and it was working just fine prior to last night. I’ve been doing socket connections for a project and thought maybe I exceeded the max connections so I reset the box, and my PC. Nothing changed.
I’m at a loss and would appreciate any help.
Note: It was working fine for 5 days up until last night. I don’t need suggestions to use SFTP, I don’t want to right now.
Thanks.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @derekrynd
The problem on the control panel is currently being investigated: https://twitter.com/digitalocean/status/857315015308824578
VSFTP should log to somewhere - perhaps /var/log/vsftp.log - have a look in the log to see if it will give you more information.
Solved the 451 issue. Log file in /var/log/apache2 was 28 GB in size, deleted, problem solved.
For anyone else stumbling upon this, while the error has been found, I’ll try to expand a little more on it for other cases.
The error message “451 Failure writing to local file” in VSFTPD typically points to issues on the server-side where the FTP service is running. The issue might be related to disk space, file system permissions, or the FTP server’s configuration. Here are some steps to help you troubleshoot and hopefully resolve the issue:
Before diving into more complex troubleshooting, ensure that the server has enough disk space to accept new files. Use the df command to check disk space usage:
df -h
Look for the mount point /var/www is on and check if it’s nearly full.
Although you’ve set permissions to 777 and changed ownership, it’s good to verify:
/var/www. Overly permissive settings (777) are not recommended for security reasons, but for troubleshooting, you can check them:ls -ld /var/www
Ownership: Make sure that the directory ownership is correct. The owner should be the user under which VSFTPD is running. This might not necessarily be ftp:ftp depending on your VSFTPD configuration:
ls -l /var/www
If there is a large number of open files or if your inodes are used up, it can prevent new files from being created:
ulimit -n
Increase if necessary.
Check Inode Usage:
df -i
VSFTPD logs could provide more insights into what’s going wrong. Check the VSFTPD log file, usually located at /var/log/vsftpd.log or similar. Look for any error messages around the time the file transfer failed:
grep -i error /var/log/vsftpd.log
There might be configuration directives in VSFTPD related to file writing, such as anon_upload_enable, write_enable, and others. Verify these settings in your vsftpd.conf:
cat /etc/vsftpd.conf | grep write_enable
write_enable=YES is uncommented.If you are on a system with SELinux enabled, it could be interfering with VSFTPD’s ability to write files:
getenforce
ls -Z /var/www
/var/www or consider setting SELinux to permissive mode temporarily to test:setenforce 0
There might be underlying file system issues. Run a file system check (be careful with mounted or live file systems):
sudo fsck /dev/sdaX
Replace /dev/sdaX with your actual partition.
After making changes, ensure you restart the VSFTPD service:
sudo systemctl restart vsftpd
Sometimes, the issue could be with the FTP client. Try using another FTP client or command-line FTP to see if the issue persists. This can help isolate whether the problem is with FileZilla or the server setup.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.