iptables & ftp & WordPress upgrade

I followed the Linode Library to setup my firewall rules, and not able to use ftp. The document says "we strongly recommend that you do not use those protocols". I can use sftp to access my dir, but it seems WordPress can't. Then I can't upgrade WordPress in the browser.

I don't have much experiences on using iptables before. Could any please tell me:

1) is the WordPress problem caused by the iptables blocked the ftp ports?

2) how to make WordPress upgrading function work?

Thanks!

4 Replies

FTP does not come installed on a Linode by default, only SSH File Transfer Protocol (SFTP) is there.

WordPress is asking for your FTP credentials because it does not have the folder/file permissions to write to its own files. That means, the user that your PHP scripts are being executed as (probably www-data), does not have permission to write to the files/folders where WordPress is installed.

-Tim

Edit: So, to make it work you'd need to make it so WordPress can write. There are a few ways to do it, but I'd suggest looking at the WordPress documentation for any best practices.

@theckman:

FTP does not come installed on a Linode by default, only SSH File Transfer Protocol (SFTP) is there.

WordPress is asking for your FTP credentials because it does not have the folder/file permissions to write to its own files. That means, the user that your PHP scripts are being executed as (probably www-data), does not have permission to write to the files/folders where WordPress is installed.

-Tim

Edit: So, to make it work you'd need to make it so WordPress can write. There are a few ways to do it, but I'd suggest looking at the WordPress documentation for any best practices.

Yes, you are right. Thanks man.

I did this post after I found its no use to change the owner of wp-content/upgrade to www-data. Now after I change the permission of the upgrade dir to 777 it works. My bad. :S

Just make sure to change it back to non-writable after you're done with the upgrade.

@rsk:

Just make sure to change it back to non-writable after you're done with the upgrade.

Could please explain more. Is it necessary to do that if I'm the only one on this VPS node?

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct