-
Notifications
You must be signed in to change notification settings - Fork 4
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
Importing photos step 2 not working open_basedir restriction #79
Comments
I think this is caused by Zoph making sure the entire directory path exists, starting from /, moving down into the path. I will have to look into this on my development system. |
Great - thank you. I think the best is to change this, because in general it is no good idea to grant access for php outside the webroot. It's ok for a single file like the zoph.ini in /etc/ but not for the entire root path. |
I agree. In fact Zoph does only need access to /etc/zoph.ini, the webroot and the location of the photos (which should be outside the webroot). However, when Zoph is creating directories during import, it will start at / to make sure every directory in the path exists. open_basedir prevents Zoph from "seeing" the directory - which leads to Zoph assuming it does not exist, hence trying to create it. I will need to see what can be done to prevent this. |
I have reproduced the issue on my dev system. Now working on a fix. |
Changed the order in which recursive creation of directories is executed. The 'old' way was to start at the root and work the way up to the dir to be created. This caused problems when open_basedir restriction is activated. The 'new' behaviour is to start at the dir to be created, then work up to the first dir that needs to be created and then work back down. As long as the "basedir" exists, this will keep Zoph from trying to pry on the filesystem outside of the basedir. Also, did some refactoring, moving a few related function out of util.inc.php into the file class. Issue #79
Changed the order in which recursive creation of directories is |
I tried to import images from a zip file. Uploading and unpacking the zip works. Then I see the images and when I click one image and try to import I gut an php error.
Error message is below. For me it seems that it tries to create a directory in / - but I do not want to allow php to access everywhere. I granted access to the own webroot and to /etc/zoph.ini
Can something changed to make open_basedir working?
The text was updated successfully, but these errors were encountered: