I have tried to use the update system on a system where the FTP logins appear to be chrooted to the account's home directory.
This breaks the automatic module install/update system in the following manner:
update.module expects the FTP path for a module to match the data retrieved from what php tells it. In this instance, /home/.sites/123/site45/web/sites/all/modules/

The FTP's chroot has the structure as /web/sites/all/modules/

When Drupal tries to chdir to /home/.sites etc, which ~does not exist~ with the chroot setup, the updates fail.

-- Suggested Fix:
Allow admin to be able to specify the FTP path ( either in the update settings, or on the page where one enters the ftp login) to get to the drupal installation so the update process can be completed.

To recap: Dupal should not always trust the paths that it gets from PHP for determining FTP paths -- there needs to be a way for the user to verify/correct in cases like these.

Comments

bfroehle’s picture

The chroot should be automatically detected by FileTransfer::findChroot. Let's try to figure out why this is not working...

clarjon1’s picture

I've taken a look at the logs ( /var/log/messages ) when drupal is running, and this is the output:

Aug 23 12:41:55 ds1 proftpd[1613]: [ip removed] ([ip removed][[ip removed]]) - FTP session opened.
Aug 23 12:41:57 ds1 PAM_pwdb[1613]: (ftp) session opened for user demo by (uid=0)
Aug 23 12:41:58 ds1 proftpd[1613]: [ip removed] ([ip removed][[ip removed]]) - PAM(setcred): System error
Aug 23 12:41:58 ds1 proftpd[1613]: [ip removed] ([ip removed][[ip removed]]) - PAM(close_session): System error
Aug 23 12:41:58 ds1 proftpd[1613]: [ip removed] ([ip removed][[ip removed]]) - FTP session closed.
Aug 23 12:42:00 ds1 proftpd[1624]: [ip removed] ([ip removed][[ip removed]]) - FTP session opened.
Aug 23 12:42:03 ds1 PAM_pwdb[1624]: (ftp) session opened for user demo by (uid=0)
Aug 23 12:42:04 ds1 proftpd[1624]: [ip removed] ([ip removed][[ip removed]]) - PAM(setcred): System error
Aug 23 12:42:04 ds1 proftpd[1624]: [ip removed] ([ip removed][[ip removed]]) - PAM(close_session): System error
Aug 23 12:42:04 ds1 proftpd[1624]: [ip removed] ([ip removed][[ip removed]]) - FTP session closed.

Is there some code I can inject (temporarily) into the drupal core files that I can use to get a more in-depth look at the FTP connection?

Bojhan’s picture

Priority: Major » Normal

A bug, but not a biggie.

controla’s picture

not a biggie but certainly needs a fix, any update on this? just been bitten by it.

pepe000’s picture

version 7.20 - bug still occurs

Version: 7.7 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.