Strange "open_basedir" problem
I have strange errors in Owncloud log during cron job like:
is_file(): open_basedir restriction in effect. File(/appinfo/app.php) is not within the allowed path(s): {...} at /usr/share/webapps/owncloud/lib/private/app.php#136
file_exists(): open_basedir restriction in effect. File(/appinfo/routes.php) is not within the allowed path(s): {...} at /usr/share/webapps/owncloud/lib/private/route/router.php#106
Why does it look in root ('/') for files? How can I debug it? If I turn off all apps from gui, these errors still occur. There is nothing wrong with functionality as I can see though. I broke my head already :)
Version 8.2.0
@LukasReschke any idea?
@Dreadeath It might be useful to fill out the issue template as asked here (linked in the yellow box when creating an issue): https://github.com/owncloud/core/blob/master/CONTRIBUTING.md#short-version
This provides the mandatory info about your environment.
Actual behaviour
Errors in log during cron.php job:
is_file(): open_basedir restriction in effect. File(/appinfo/app.php) is not within the allowed path(s): {...} at /usr/share/webapps/owncloud/lib/private/app.php#136
file_exists(): open_basedir restriction in effect. File(/appinfo/routes.php) is not within the allowed path(s): {...} at /usr/share/webapps/owncloud/lib/private/route/router.php#106
Server configuration
Operating system: Arch Linux Web server: Nginx Database: Mariadb PHP version: 5.6.14 ownCloud version: 8.2.0.12 Updated from an older ownCloud or fresh install: Updated List of activated apps: Enabled:
- activity: 2.1.3
- calendar: 0.8.0
- chat: 0.4.0.1
- contacts: 0.5.0.0
- documents: 0.10.2
- encryption: 1.1.0
- files: 1.2.0
- files_external: 0.3.0
- files_mv: 0.8.1a
- files_odfviewer: 0.1
- files_pdfviewer: 0.7
- files_sharing: 0.7.0
- files_texteditor: 2.0
- files_trashbin: 0.7.0
- files_versions: 1.1.0
- files_videoviewer: 0.1.3
- gallery: 14.2.0
- notes: 1.1.0
- tasks: 0.8
- tattoo: 0.2
- updater: 0.6
The content of config/config.php: "datadirectory": "/www/owndata/data", "overwrite.cli.url": "_removed", "dbtype": "mysql", "version": "8.2.0.12", "dbname": "owncloud", "dbhost": "localhost", "dbtableprefix": "oc", "dbuser": "_REMOVED SENSITIVE VALUE", "dbpassword": "_REMOVED SENSITIVE VALUE", "installed": true, "preview_libreoffice_path": "/usr/bin/libreoffice", "enable_avatars": true, "remember_login_cookie_lifetime": 2678400, "updatechecker": false, "memcache.local": "\OC\Memcache\Redis", "filelocking.enabled": "true", "memcache.locking": "\OC\Memcache\Redis", "redis": { "host": "/run/redis/redis.sock", "port": 0, "timeout": 0 }, "asset-pipeline.enabled": true, "assetdirectory": "/www/owndata", "logtimezone": "Etc/UTC", "cipher": "AES-256-CFB", "apps_paths": [ { "path": "/usr/share/webapps/owncloud/apps", "url": "/apps", "writable": false }, { "path": "/www/owndata/apps2", "url": "/apps2", "writable": true } ], "forcessl": true, "forceSSLforSubdomains": true, "maintenance": false, "loglevel": 0, "trashbin_retention_obligation": "auto"
Are you using external storage, if yes which one: No
Are you using encryption: Yes
For some reason, findAppInDirectories() fails, so getAppPath() returns false. Thanks to the intelligence of PHP however, concatenating false with '/appinfo/app.php' isn't an error, no, it's just '/appinfo/app.php'. Praise be to PHP. (At least we aren't concatenating with true, that'd be '1/appinfo/app.php'!)
We need a check wherever getAppPath() is used, or we just need to throw an exception if getAppPath() cannot find the app.
@Xenopathic, is there a way to find out what apps caused that? Maybe it is related to deleted ones and its leftovers in db?
Any thoughts, anyone? I see "need info" tag here, what info could be useful?
@Xenopathic @Dreadeath Fix is in https://github.com/owncloud/core/pull/22376
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.