There is a “Permission denied” error when UpdraftPlus tries to contact remote storage

Short version: if you run your own server, it may have SELinux or AppArmor, which are likely configured to forbid network access. You need to enable that access. Otherwise, it’s probably a firewall. Long version follows!

There can be many causes why UpdraftPlus is unable to contact your remote storage (e.g. Dropbox, Google Drive, FTP server, etc.). Some of these are:

  • An incoming firewall on the remote storage (e.g. your FTP server needs a new firewall rule to allow the incoming traffic)
  • A misconfigured firewall on the remote storage (the FTP protocol is particularly susceptible to this, especially if you FTP server is on a private network, and especially if you are using encrypted FTP)
  • An outgoing firewall on the webserver or web hosting company’s network (i.e. they are restricting outgoing traffic, and you need to ask them to allow yours)
  • The remote storage is currently down
  • The network is too congested, and traffic can’t currently get through (in both these latter two cases, you just need to wait for UpdraftPlus to retry)

However, if the error or log file you see specifically has the words “Permission denied” in it, for example like this…

PHP event: code E_USER_NOTICE: Cannot connect to server.example.com:1234 Error 13. Permission denied

… then the problem is on your webserver, which is configured to disallow outgoing network connections. This may be an outgoing firewall (i.e. as mentioned above); or if not, it is another security control mechanism in use on the server. The most common of these are SELinux (on CentOS/RedHat-like systems) and AppArmor (on Ubuntu-like systems).

In the case of SELinux, the solution is usually to turn on the httpd_can_network_connect boolean, to allow Apache (and thus mod_php, if that is how PHP is running on your system) to use the network. More information.

Posted in: Troubleshooting

twitterlinkedinFacebook