-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
getSourcePath broken for External storage (Local)? #29770
Comments
This is very similar to #28473 |
@szaimen , I don't think it's right to close this issue, because I ran the command you suggested |
The Nextcloud Snap appliance only supports accessing directories in /media or /mnt... |
@szaimen , well why did nobody tell us that? |
Please ask your question here: https://help.nextcloud.com/tags/c/support/appliances-docker-snappy-vm/33/snap |
Thanks, @szaimen , I'll follow up on those two links. To report on trying to use a folder within /media:I copied the test folder tree from /home/ltadmin to /media and made sure the ownership was www-data:www-data and that the permissions are right for that user to create files and folders there. Do you think the non-snap version would behave better? |
The ownership needs to be root:root in case of the snap |
@szaimen , can you pls point me to where that is documented. It's hard for us users to get things right when the snap version departs from what is documented for the other version at so many points. |
It must be documented somewhere here: https://github.com/nextcloud-snap/nextcloud-snap For further questions please ask here: https://help.nextcloud.com/tags/c/support/appliances-docker-snappy-vm/33/snap I am unsubscribing now! |
How to use GitHub
I prepared this bug report using the Issue reporting app in NC:
Steps to reproduce
/home/ltadmin/LTSync is owned by user running apache2 (www-data) and the group is the same.
(nextcloud.occ files_external:list shows
| Mnt ID | Mnt Pt | Storage | Auth Type | Configuration | Options | Users | Groups |
+---------+---------+------------+--------------+------------------------------------+------------------------------------+---------+----------+
| 3 | /LTSync | Local | None | datadir: "/home/ltadmin/LTSync" | enable_sharing: T, previews: F | ltadmin| |)
Check that user www-data can list properties and see contents of all folders from leaf to root with commands like
sudo -u www-data ls -ld /home/ltadmin/LTSync
Even the user nobody can see inside all folders from root to leaf.
Expected behaviour
NC should create new folder inside /home/ltadmin/LTSync with the name requested.
Actual behaviour
Administration->Logging shows:
[PHP] Error: opendir(/home/ltadmin/LTSync/): Failed to open directory: Permission denied at /snap/nextcloud/28586/htdocs/lib/private/Files/Storage/Local.php#135
PROPFIND /remote.php/dav/files/ltadmin/
from 14.200.30.196 by ltadmin at 2021-11-18T09:34:53+00:00
Server configuration detail
Operating system: Linux 5.11.0-40-generic #44~20.04.2-Ubuntu SMP Tue Oct 26 18:07:44 UTC 2021 x86_64
Webserver: Apache (fpm-fcgi)
Database: mysql 8.0.26
PHP version:
8.0.11
Modules loaded: Core, date, libxml, openssl, pcre, zlib, bcmath, bz2, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, gmp, SPL, iconv, intl, json, ldap, mbstring, pcntl, PDO, session, posix, Reflection, standard, SimpleXML, mysqlnd, exif, tokenizer, xml, xmlreader, xmlwriter, zip, pdo_mysql, cgi-fcgi, redis, Zend OPcache
Nextcloud version: 22.2.0 - 22.2.0.2
Updated from an older Nextcloud/ownCloud or fresh install: no
Where did you install Nextcloud from: Downloaded stancard snap file from standard NC website.
Signing status
Array
(
)
List of activated apps
Configuration (config/config.php)
Are you using external storage, if yes which one: local
Are you using encryption:
Are you using an external user-backend, if yes which one: I don't think so.
Client configuration
Browser: Chromium
Operating system:
Logs
Web server error log
Nextcloud log
Browser log
Insert your browser log here, this could for example include:
My comments
The error message comes from line 135 of the file named, which contains:
return opendir($this->getSourcePath($path))
which is overloading the standard PHP opendir function.
When you look at the function getSourcePath, (line 446) it seems to be adding $path to the datadir, which, I am guessing, would be
/var/snap/nextcloud/common/nextcloud/data/ltadmin/files
That would look for the folder
/var/snap/nextcloud/common/nextcloud/data/ltadmin/files/home/ltuser/LTSync
which doesn't exixt, instead of
/home/ltuser/LTSync
Is that what is happening?
Thanks for thinking about these things.
The text was updated successfully, but these errors were encountered: