Notifications
Clear all

[Solved] Virtualmin FTP: Cannot Overwrite Remote File  

  RSS

Tharindu
(@tharindu)
Admin
Joined: 6 years ago
Posts: 233
01/05/2020 10:33 pm  

Virtualmin's default settings are sufficient for most folks out there. But they are no good for websites in active development or production. There are lot of options that needs to be adjusted. Today I'm going to talk about such option.

A newly assigned developer to a website hosted on one of my Managed VPS came to me with following error.

They were using a FTP-only account. Server was configured to use sftp over port 2222. The directories and files had proper permissions for them to read and write files. The only issue was they can't overwrite. They could delete and recreate the files as suggested in the error message. But that wasn't a good solution to the problem.

I went ahead and test it myself using FileZilla. Following was the error I got.

Status: Starting upload of C:\Users\xxxxx\AppData\Local\Temp\fz3temp-2\template-on_air.php
Status: Retrieving directory listing of "/wp-content/themes/eduma-child"...
Status: Listing directory /wp-content/themes/eduma-child
Command: put "C:\Users\tjosm\AppData\Local\Temp\fz3temp-2\template-on_air.php" "template-on_air.php"
Error: /wp-content/themes/eduma-child/template-on_air.php: open for write: permission denied
Error: File transfer failed

There is an easy solution for this, we were getting this because, file overwrite wasn't enabled on ProFTPD server. Turns out that the default setting was not to allow file overwrites. We went ahead and enable file overwrites. In case you find yourself in the same situation, here's how to fix Virtualmin FTP Error: Cannot Overwrite Remote File

Open ProFTPD configuration file,

nano /etc/proftpd/proftpd.conf

Find the following line,

DefaultRoot ~

Add following value in a new line immediately after it,

AllowOverwrite on

Close file and then restart ProFTPD,

service proftp restart

That should fix the error.

 

Become a vpsfix.com affiliate and earn up to 10% commissions from your referrals


Quote
Topic Tags
Share:
Back to top button

We use cookies to give you the best online experience. By agreeing you accept the use of cookies in accordance with our cookie policy.

Close