Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot connect to hosting site using FTP in upgrade process #6742

Open
clarkac1 opened this issue Oct 31, 2024 · 1 comment
Open

Cannot connect to hosting site using FTP in upgrade process #6742

clarkac1 opened this issue Oct 31, 2024 · 1 comment

Comments

@clarkac1
Copy link

The Backdrop module & system upgrade process calls for an FTP connection, but then is unable to connect to the hosting site (civihosting.com). However, using the same credentials I can connect with Filezilla.

I clicked Configuration/System/System Updates then selected a module that needed to be updated.
screenshot_20241031_141100

I clicked 'Download Selected Updates' then 'Continue'
I get the FTP signin screen (attached)
I enter my credentials (which are same credentials I used to login to the hosting site at s812.sureserver.com) but I get the following messages:

  • Notice: Undefined property: FileTransferFTPExtension::$connection in FileTransferFTPExtension->connect() (line 56 of /home/kewguild/www/my/core/includes/filetransfer/ftp.inc).
    
  • Failed to connect to the server. The server reports the following message:
    
  • Cannot connect to FTP Server, check settings
    

I raised a ticket with the Civihosting support and this is their response:

"We changed the permissions of the "files" folder to 775 as listed in the Backdrop documentation, but that did not help.

For some reason, the application connects to the FTP server and immediately disconnects. We could not find any settings in the files of the application that could cause this. To verify that FTP connections can be established via PHP scripts on your account, we created a test script (/home/kewguild/www/my/test.php). You can access it at https://my.kewguild.org.uk/test.php to verify that there are no problems on the server end."

Backdrop version 1:28.2
PHP 7.4.33 (also tried PHP 8.1)
MySQL is 8.0.36-percona-sure1
Browser Firefox 132.0

@quicksketch
Copy link
Member

Hi @clarkac1, thanks for the bug report. To use Backdrop self-updater (or module installer), we recommend making the core and modules directories writable by the web server. There is documentation available at https://docs.backdropcms.org/documentation/file-permissions-and-ownership. Follow the steps for the "looser permissions" option.

The FTP-based permissions is tricky to get working correctly and we're planning on eventually removing it, see #3208.

"We changed the permissions of the "files" folder to 775 as listed in the Backdrop documentation, but that did not help.

That's necessary to allow Backdrop to upload to the "files" directory, but it does not impact the modules or core directory, which is what's needed for the self-updater.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants