I'm trying to update both core and some modules via the web interface.

https://example.org/admin/appearance/update

My webhost requires SFTP connection. However, through the Backdrop web interface linked above I only see FTP as a connection option. When I use working credentials in the web update interface, I get an error saying that I can't connect to the FTP server.

Is this likely an issue that the server only accepts SFTP connections and not FTP connections? If that is the case, are there plans afoot to perform web interface updates via SFTP? It would be really handy to be able to just click and button and fill in credentials to perform an update. Thanks in advance.

Most helpful answers

If I got it correctly, nathancraig tried to use the UI ("through the Backdrop web interface linked above"). But depending on the server configuration (at least in Drupal) it can happen that you have to put FTP credentials while updating a module via the user interface.

I guess the solution is to configure the server in a way that you don't need (S)FTP credentials. Here's a short article about it (regarding Drupal):

https://stevenschwenke.de/updatingModulesAndThemesRequiresFTPAccessToYou...

I don't have an answer to your specific question, but have you tried using the Project Installer module to do the updates directly in the UI without needing SFTP credentials? See a demo here (sorry the audio quality is not great):

Comments

Olafski's picture

If I got it correctly, nathancraig tried to use the UI ("through the Backdrop web interface linked above"). But depending on the server configuration (at least in Drupal) it can happen that you have to put FTP credentials while updating a module via the user interface.

I guess the solution is to configure the server in a way that you don't need (S)FTP credentials. Here's a short article about it (regarding Drupal):

https://stevenschwenke.de/updatingModulesAndThemesRequiresFTPAccessToYou...

Thank you for the leads. The first video illustrates what I'm trying to do.

1. Under updates, settings, Manual self-update is checked and saved.

2. When I go to updates modules and select an item or items to update, and proceed to download these updates, I get a continue button asking me to put the site into maintenance mode. Following this, I come to a screen not shown in the youtube link you shared, but one that is shown in the article you linked.

3. From the article, I gather than I must "change the owner of sites/default to the PHP-user (www-data)".

I read the drupal docs linked in your article and searched the page for php. I saw several mentions of the term but nothing on setting the owner of www-data.

I'm confused because the user who owns the directory where backdrop is stored is different from the PHP-user that accesses the database. In other words, the web host doesn't have a means to sign into the server with the PHP-user--they are different logins. I may be misunderstanding things. I thank you for your suggestions, but do you have any further leads or can you explain further what you mean by "change the owner of sites/default to the PHP-user (www-data)". For example, to the best of my knowledge, I don't have a www-data directory.

Olafski's picture

Unfortunately, I can't help much with server configuration questions. As the issue can happen in Drupal as well, and Drupal has more installations in the wild than Backdrop, maybe search the web for something like "drupal update module ftp credentials" and adapt the results to Backdrop.

In one of the first results (https://www.drupal.org/forum/support/post-installation/2011-01-22/module...) the www-data question is explained in different words:

To avoid this, make sure the folder /sites/default is OWNED by the user that executes the drupal scripts. On most Ubuntu installations, this is the apache user: www-data.

So, the user doesn't have to be www-data. The name seems to depend on the operation system. Also, usually (or: out of the box) there is no /sites/default directory in Backdrop.

I guess my answer doesn't help directly, so I hope someone with more server configuration skills can chime in.

This is helpful. I've contacted the admins with the web host. I will report back what I learn. Much appreciated.