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

symlink to document root causing module update issues #3008

Open
jenlampton opened this issue Mar 27, 2018 · 6 comments
Open

symlink to document root causing module update issues #3008

jenlampton opened this issue Mar 27, 2018 · 6 comments

Comments

@jenlampton
Copy link
Member

@jenlampton jenlampton commented Mar 27, 2018

Describe your issue or idea

When attempting to update on_the_web module using the updater at admin/modules/update, my update succeeded on my local site, but failed on my live site, with the following error:
File Transfer failed, reason: path/to/www/modules/contrib/on_the_web is outside of the path/to/docroot.

That error is incorrect, as on this server www is a symbolic link to docroot.

I suspect there's something about this symlink that's causing the problem. Noting the issue here incase anyone else is experiencing something similar.

@bradbulger

This comment has been minimized.

Copy link

@bradbulger bradbulger commented Dec 4, 2018

I have a similar problem in, I think. I'm running the site at https://localhost/mydirectory/. Apache looks in /var/www/html for localhost directories. /var/www/html/mydirectory is a symlink to /home/www/mydirectory for reasons.

I changed FileTransfer's checkPath function to run everything through backdrop_realpath() before comparisons and that stopped the problem. I'm hoping that means I'll be able to move modules/contrib and modules/custom back up above the docroot and use symlinks for them, which was my original problem (I thought).

@padprint

This comment has been minimized.

Copy link

@padprint padprint commented Aug 26, 2019

just a note to say this is still a problem:
File Transfer failed, reason: /web/reiff7/modules/job_scheduler is outside of the /usr/local/www/apache24/data/reiff7

My development server has a symbolic link to the docroot that throws this every time I try (after forgetting) to update modules.

@klonos

This comment has been minimized.

Copy link
Member

@klonos klonos commented Aug 26, 2019

Thanks for taking the time to confirm this @padprint 👍

@oadaeh

This comment has been minimized.

Copy link

@oadaeh oadaeh commented Aug 27, 2019

I have not looked into this issue, but in case it helps I will say that PHP de-references symbolic links when it encounters them. I have been able to work around some of them in the past, but it usually involved painful contortions.

@bradbulger

This comment has been minimized.

Copy link

@bradbulger bradbulger commented Oct 17, 2019

I believe I have a fix for this but I want to test it under more circumstances. I can't figure out what kind of configuration would result in the FileTransfer object having a value for its "chroot" property. If anyone has thoughts about how to create an installation so that it would be set to something, that would be helpful.

@olafgrabienski

This comment has been minimized.

Copy link

@olafgrabienski olafgrabienski commented Mar 25, 2020

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

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.