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

files_external crashes if WebDAV has subfolders the user doesn't have access to #9185

Closed
violoncelloCH opened this issue Apr 14, 2018 · 7 comments
Labels
1. to develop Accepted and waiting to be taken care of bug feature: external storage

Comments

@violoncelloCH
Copy link
Member

violoncelloCH commented Apr 14, 2018

Steps to reproduce

  1. connect to a WebDAV Server via files_external in which there are Subfolders the WebDAV user doesn't have read access to
  2. open the external storage folder in nextcloud and try to open a folder with children the user doesn't have access to

Expected behaviour

Nextcloud should open the folder and show the folders the WebDAV user has permissions to and skip the other...

Actual behaviour

external folder is closed completely with the error "storage temporarly unavailable".
see cloud log

Server configuration

Operating system: Ubuntu 16.04

Web server: Apache 2

Database: MariaDB

PHP version: 7.2

Nextcloud version: 13.0.1

Updated from an older Nextcloud/ownCloud or fresh install: tested on updated and fresh install

Where did you install Nextcloud from: download.nextcloud.com

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
  - activity: 2.6.1
  - bruteforcesettings: 1.0.3
  - comments: 1.3.0
  - dav: 1.4.6
  - federatedfilesharing: 1.3.1
  - federation: 1.3.0
  - files: 1.8.0
  - files_automatedtagging: 1.3.0
  - files_external: 1.4.1
  - files_pdfviewer: 1.2.1
  - files_rightclick: 0.5.0
  - files_sharing: 1.5.0
  - files_texteditor: 2.5.1
  - files_trashbin: 1.3.0
  - files_versions: 1.6.0
  - files_videoplayer: 1.2.0
  - firstrunwizard: 2.2.1
  - gallery: 18.0.0
  - groupfolders: 1.2.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.1.0
  - metadata: 0.6.0
  - nextcloud_announcements: 1.2.0
  - notifications: 2.1.2
  - oauth2: 1.1.0
  - password_policy: 1.3.0
  - provisioning_api: 1.3.0
  - ransomware_protection: 1.1.0
  - serverinfo: 1.3.0
  - sharebymail: 1.3.0
  - survey_client: 1.1.0
  - systemtags: 1.3.0
  - theming: 1.4.1
  - twofactor_backupcodes: 1.2.3
  - updatenotification: 1.3.0
  - user_external: 0.4
  - workflowengine: 1.3.0

Nextcloud configuration:

Config report
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***"
        ],
        "auth.bruteforce.protection.enabled": true,
        "0": [
            ".htaccess",
            "Thumbs.db",
            "thumbs.db"
        ],
        "cron_log": true,
        "activity_expire_days": 33,
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "13.0.1.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "enable_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\Movie",
            "OC\\Preview\\PDF",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown"
        ],
        "preview_max_x": 1024,
        "preview_max_y": 768,
        "preview_max_scale_factor": 1,
        "filesystem_check_changes": 0,
        "filelocking.enabled": "true",
        "htaccess.RewriteBase": "\/",
        "integrity.check.disabled": false,
        "knowledgebaseenabled": false,
        "logfile": "\/var\/nc_data\/nextcloud.log",
        "loglevel": 2,
        "logtimezone": "Europe\/Berlin",
        "log_rotate_size": 104857600,
        "maintenance": false,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "overwriteprotocol": "https",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        },
        "quota_include_external_storage": false,
        "share_folder": "",
        "skeletondirectory": "",
        "theme": "",
        "trashbin_retention_obligation": "auto, 7",
        "updater.release.channel": "stable",
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "user_backends": [
            {
                "class": "\\OCA\\User_External\\WebDAVAuth",
                "arguments": [
                    "***REMOVED SENSITIVE VALUE***"
                ]
            }
        ],
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***"
    }
}

Are you using external storage, if yes which one: webdav

Are you using encryption: no

Are you using an external user-backend, if yes which one: WebDAV, but it's the same without

Nextcloud log (data/nextcloud.log)

Nextcloud log
Fatal | Sabre\DAV\Exception\ServiceUnavailable: Storage is temporarily not available | 2018-04-14T20:47:17+0200
-- | -- | --
Error | Forbidden | 2018-04-14T20:47:17+0200
Error | Sabre\HTTP\ClientHttpException: Forbidden/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Client.php - line 231:  Sabre\HTTP\Client->send(Object(Sabre\HTTP\Request))/var/www/html/nextcloud/lib/private/Files/Storage/DAV.php - line 263:  Sabre\DAV\Client->propFind('https //webdav....', Array)/var/www/html/nextcloud/lib/private/Files/Storage/DAV.php - line 708:  OC\Files\Storage\DAV->propfind('data/VorlagenX')/var/www/html/nextcloud/lib/private/Files/Storage/Common.php - line 662:  OC\Files\Storage\DAV->getPermissions('data/VorlagenX')/var/www/html/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 581:  OC\Files\Storage\Common->getMetaData('data/VorlagenX')/var/www/html/nextcloud/lib/private/Files/Storage/Wrapper/PermissionsMask.php - line 145:  OC\Files\Storage\Wrapper\Wrapper->getMetaData('data/VorlagenX')/var/www/html/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 581:  OC\Files\Storage\Wrapper\PermissionsMask->getMetaData('data/VorlagenX')/var/www/html/nextcloud/lib/private/Files/Storage/Wrapper/Availability.php - line 463:  OC\Files\Storage\Wrapper\Wrapper->getMetaData('data/VorlagenX')/var/www/html/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 581:  OC\Files\Storage\Wrapper\Availability->getMetaData('data/VorlagenX')/var/www/html/nextcloud/lib/private/Files/Cache/Scanner.php - line 112:  OC\Files\Storage\Wrapper\Wrapper->getMetaData('data/VorlagenX')/var/www/html/nextcloud/lib/private/Files/Cache/Scanner.php - line 150:  OC\Files\Cache\Scanner->getData('data/VorlagenX')/var/www/html/nextcloud/lib/private/Files/Cache/Scanner.php - line 435:  OC\Files\Cache\Scanner->scanFile('data/VorlagenX', 3, '549060', NULL, true)/var/www/html/nextcloud/lib/private/Files/Cache/Scanner.php - line 403:  OC\Files\Cache\Scanner->handleChildren('data', false, 3, '549060', true, -1)/var/www/html/nextcloud/lib/private/Files/Cache/Scanner.php - line 337:  OC\Files\Cache\Scanner->scanChildren('data', false, 3, '549060', true)/var/www/html/nextcloud/lib/private/Files/View.php - line 1327:  OC\Files\Cache\Scanner->scan('data', false)/var/www/html/nextcloud/lib/private/Files/View.php - line 1371:  OC\Files\View->getCacheEntry(Object(OCA\Files_Trashbin\Storage), 'data', 'SBL/data')/var/www/html/nextcloud/apps/dav/lib/Connector/Sabre/ObjectTree.php - line 157:  OC\Files\View->getFileInfo('/jonas/files/SB...')/var/www/html/nextcloud/apps/end_to_end_encryption/lib/Connector/Sabre/LockPlugin.php - line 144:  OCA\DAV\Connector\Sabre\ObjectTree->getNodeForPath('SBL/data')/var/www/html/nextcloud/apps/end_to_end_encryption/lib/Connector/Sabre/LockPlugin.php - line 114:  OCA\EndToEndEncryption\Connector\Sabre\LockPlugin->getNode('SBL/data', 'PROPFIND')[internal function] OCA\EndToEndEncryption\Connector\Sabre\LockPlugin->checkLock(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))/var/www/html/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105:  call_user_func_array(Array, Array)/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 466:  Sabre\Event\EventEmitter->emit('beforeMethod', Array)/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254:  Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))/var/www/html/nextcloud/apps/dav/appinfo/v1/webdav.php - line 80:  Sabre\DAV\Server->exec()/var/www/html/nextcloud/remote.php - line 164:  require_once('/var/www/html/n...'){main} | 2018-04-14T20:47:17+0200


@violoncelloCH violoncelloCH changed the title files_external crashes if WebDAV has subfolders the user hasn't access to files_external crashes if WebDAV has subfolders the user doesn't have access to Apr 19, 2018
@nextcloud-bot nextcloud-bot added the stale Ticket or PR with no recent activity label Jun 20, 2018
@nextcloud-bot
Copy link
Member

Hey, this issue has been closed because the label stale is set and there were no updates for 14 days. Feel free to reopen this issue if you deem it appropriate.

(This is an automated comment from GitMate.io.)

@nextcloud-bot nextcloud-bot removed the stale Ticket or PR with no recent activity label Jul 5, 2018
@violoncelloCH
Copy link
Member Author

please reopen

@violoncelloCH
Copy link
Member Author

to clarify: Our school has a server accessable over WebDAV with a large folder structure. E.g. there exists a folder "courses" containing a folder for every scholar course obviously. There exist hundreds of folders but a specific student only has access to a small amount of course folders.
On opening the "courses" folder, nextcloud crashes with the described error.
Unfortunately I don't have acces to the config of the WebDAV server itself.

@skjnldsv
Copy link
Member

Still occurring?
Could you paste the json error from log? :)

@violoncelloCH
Copy link
Member Author

yes, it's still occurring (just had to ask someone who's still got an account at the school to help me test it)...

nextcloud log:

{"reqId":"jmQ9rCYuk1p8nNz6oiWL","level":0,"time":"2019-08-31T10:57:34+02:00","remoteAddr":"85.0.185.229","user":"exuser","app":"files_external","method":"PROPFIND","url":"\/remote.php\/dav\/files\/exuser\/SBL-Test\/data","message":{"Exception":"Sabre\\HTTP\\ClientHttpException","Message":"Forbidden","Code":403,"Trace":[{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Client.php","line":231,"function":"send","class":"Sabre\\HTTP\\Client","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"}]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/Storage\/DAV.php","line":260,"function":"propFind","class":"Sabre\\DAV\\Client","type":"->","args":["https:\/\/webdav.example.ch\/gymli\/\/data\/AG_init",["{DAV:}getlastmodified","{DAV:}getcontentlength","{DAV:}getcontenttype","{http:\/\/owncloud.org\/ns}permissions","{http:\/\/open-collaboration-services.org\/ns}share-permissions","{DAV:}resourcetype","{DAV:}getetag"]]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/Storage\/DAV.php","line":705,"function":"propfind","class":"OC\\Files\\Storage\\DAV","type":"->","args":["data\/AG_init"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/Storage\/Common.php","line":668,"function":"getPermissions","class":"OC\\Files\\Storage\\DAV","type":"->","args":["data\/AG_init"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/Storage\/Wrapper\/Wrapper.php","line":582,"function":"getMetaData","class":"OC\\Files\\Storage\\Common","type":"->","args":["data\/AG_init"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/Storage\/Wrapper\/PermissionsMask.php","line":145,"function":"getMetaData","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["data\/AG_init"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/Storage\/Wrapper\/Wrapper.php","line":582,"function":"getMetaData","class":"OC\\Files\\Storage\\Wrapper\\PermissionsMask","type":"->","args":["data\/AG_init"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/Storage\/Wrapper\/PermissionsMask.php","line":145,"function":"getMetaData","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["data\/AG_init"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/Storage\/Wrapper\/Wrapper.php","line":582,"function":"getMetaData","class":"OC\\Files\\Storage\\Wrapper\\PermissionsMask","type":"->","args":["data\/AG_init"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/Storage\/Wrapper\/Availability.php","line":463,"function":"getMetaData","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["data\/AG_init"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/Storage\/Wrapper\/Wrapper.php","line":582,"function":"getMetaData","class":"OC\\Files\\Storage\\Wrapper\\Availability","type":"->","args":["data\/AG_init"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/Storage\/Wrapper\/PermissionsMask.php","line":145,"function":"getMetaData","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["data\/AG_init"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/Storage\/Wrapper\/Wrapper.php","line":582,"function":"getMetaData","class":"OC\\Files\\Storage\\Wrapper\\PermissionsMask","type":"->","args":["data\/AG_init"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/Cache\/Scanner.php","line":112,"function":"getMetaData","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["data\/AG_init"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/Cache\/Scanner.php","line":150,"function":"getData","class":"OC\\Files\\Cache\\Scanner","type":"->","args":["data\/AG_init"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/Cache\/Scanner.php","line":438,"function":"scanFile","class":"OC\\Files\\Cache\\Scanner","type":"->","args":["data\/AG_init",3,71137,null,true]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/Cache\/Scanner.php","line":406,"function":"handleChildren","class":"OC\\Files\\Cache\\Scanner","type":"->","args":["data",false,3,71137,true,-1]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/Cache\/Scanner.php","line":338,"function":"scanChildren","class":"OC\\Files\\Cache\\Scanner","type":"->","args":["data",false,3,71137,true]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/View.php","line":1338,"function":"scan","class":"OC\\Files\\Cache\\Scanner","type":"->","args":["data",false]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Files\/View.php","line":1382,"function":"getCacheEntry","class":"OC\\Files\\View","type":"->","args":[{"cache":{"__class__":"OC\\Files\\Cache\\Cache"},"scanner":{"__class__":"OC\\Files\\Cache\\Scanner"},"watcher":null,"propagator":null,"updater":null,"__class__":"OCA\\Files_Trashbin\\Storage"},"data","\/SBL-Test\/data"]},{"file":"\/var\/www\/html\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/Directory.php","line":223,"function":"getFileInfo","class":"OC\\Files\\View","type":"->","args":["\/exuser\/files\/SBL-Test\/data"]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Tree.php","line":76,"function":"getChild","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["data"]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":967,"function":"getNodeForPath","class":"Sabre\\DAV\\Tree","type":"->","args":["files\/exuser\/SBL-Test\/data"]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":1666,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->","args":["files\/exuser\/SBL-Test\/data",["{DAV:}getlastmodified","{DAV:}getetag","{DAV:}getcontenttype","{DAV:}resourcetype","{http:\/\/owncloud.org\/ns}fileid","{http:\/\/owncloud.org\/ns}permissions","{http:\/\/owncloud.org\/ns}size","{DAV:}getcontentlength","{http:\/\/nextcloud.org\/ns}has-preview","{http:\/\/nextcloud.org\/ns}mount-type","{http:\/\/nextcloud.org\/ns}is-encrypted","{http:\/\/open-collaboration-services.org\/ns}share-permissions","{http:\/\/owncloud.org\/ns}tags","{http:\/\/owncloud.org\/ns}favorite","{http:\/\/owncloud.org\/ns}comments-unread","{http:\/\/owncloud.org\/ns}owner-id","{http:\/\/owncloud.org\/ns}owner-display-name","{http:\/\/owncloud.org\/ns}share-types"],1]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php","line":355,"function":"generateMultiStatus","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Generator"},false]},{"function":"httpPropFind","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"absoluteUrl":"https:\/\/cloud.example.ch\/remote.php\/dav\/files\/exuser\/SBL-Test\/data","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"Sabre\\DAV\\CorePlugin"},"httpPropFind"],[{"absoluteUrl":"https:\/\/cloud.example.ch\/remote.php\/dav\/files\/exuser\/SBL-Test\/data","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":479,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["method:PROPFIND",[{"absoluteUrl":"https:\/\/cloud.example.ch\/remote.php\/dav\/files\/exuser\/SBL-Test\/data","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"absoluteUrl":"https:\/\/cloud.example.ch\/remote.php\/dav\/files\/exuser\/SBL-Test\/data","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/var\/www\/html\/nextcloud\/apps\/dav\/lib\/Server.php","line":316,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"\/var\/www\/html\/nextcloud\/apps\/dav\/appinfo\/v2\/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"\/var\/www\/html\/nextcloud\/remote.php","line":163,"args":["\/var\/www\/html\/nextcloud\/apps\/dav\/appinfo\/v2\/remote.php"],"function":"require_once"}],"File":"\/var\/www\/html\/nextcloud\/3rdparty\/sabre\/http\/lib\/Client.php","Line":160,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:68.0) Gecko\/20100101 Firefox\/68.0","version":"16.0.4.1"}
{"reqId":"jmQ9rCYuk1p8nNz6oiWL","level":4,"time":"2019-08-31T10:57:34+02:00","remoteAddr":"85.0.185.229","user":"exuser","app":"webdav","method":"PROPFIND","url":"\/remote.php\/dav\/files\/exuser\/SBL-Test\/data","message":{"Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Message":"Sabre\\HTTP\\ClientHttpException: Forbidden","Code":0,"Trace":[{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Tree.php","line":76,"function":"getChild","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["data"]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":967,"function":"getNodeForPath","class":"Sabre\\DAV\\Tree","type":"->","args":["files\/exuser\/SBL-Test\/data"]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":1666,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->","args":["files\/exuser\/SBL-Test\/data",["{DAV:}getlastmodified","{DAV:}getetag","{DAV:}getcontenttype","{DAV:}resourcetype","{http:\/\/owncloud.org\/ns}fileid","{http:\/\/owncloud.org\/ns}permissions","{http:\/\/owncloud.org\/ns}size","{DAV:}getcontentlength","{http:\/\/nextcloud.org\/ns}has-preview","{http:\/\/nextcloud.org\/ns}mount-type","{http:\/\/nextcloud.org\/ns}is-encrypted","{http:\/\/open-collaboration-services.org\/ns}share-permissions","{http:\/\/owncloud.org\/ns}tags","{http:\/\/owncloud.org\/ns}favorite","{http:\/\/owncloud.org\/ns}comments-unread","{http:\/\/owncloud.org\/ns}owner-id","{http:\/\/owncloud.org\/ns}owner-display-name","{http:\/\/owncloud.org\/ns}share-types"],1]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php","line":355,"function":"generateMultiStatus","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Generator"},false]},{"function":"httpPropFind","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"absoluteUrl":"https:\/\/cloud.example.ch\/remote.php\/dav\/files\/exuser\/SBL-Test\/data","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"Sabre\\DAV\\CorePlugin"},"httpPropFind"],[{"absoluteUrl":"https:\/\/cloud.example.ch\/remote.php\/dav\/files\/exuser\/SBL-Test\/data","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":479,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["method:PROPFIND",[{"absoluteUrl":"https:\/\/cloud.example.ch\/remote.php\/dav\/files\/exuser\/SBL-Test\/data","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"absoluteUrl":"https:\/\/cloud.example.ch\/remote.php\/dav\/files\/exuser\/SBL-Test\/data","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/var\/www\/html\/nextcloud\/apps\/dav\/lib\/Server.php","line":316,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"\/var\/www\/html\/nextcloud\/apps\/dav\/appinfo\/v2\/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"\/var\/www\/html\/nextcloud\/remote.php","line":163,"args":["\/var\/www\/html\/nextcloud\/apps\/dav\/appinfo\/v2\/remote.php"],"function":"require_once"}],"File":"\/var\/www\/html\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/Directory.php","Line":225,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:68.0) Gecko\/20100101 Firefox\/68.0","version":"16.0.4.1"}
{"reqId":"n25OERzPRMaoLWPqEFYZ","level":3,"time":"2019-08-31T10:57:34+02:00","remoteAddr":"85.0.185.229","user":"exuser","app":"core","method":"GET","url":"\/core\/preview?fileId=66976&x=32&y=32","message":{"Exception":"ImagickException","Message":"not authorized `\/upload_tmp\/oc_tmp_dIuajV-.pdf' @ error\/constitute.c\/ReadImage\/412","Code":499,"Trace":[{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Preview\/Bitmap.php","line":87,"function":"readimage","class":"Imagick","type":"->","args":["\/upload_tmp\/oc_tmp_dIuajV-.pdf[0]"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Preview\/Bitmap.php","line":50,"function":"getResizedPreview","class":"OC\\Preview\\Bitmap","type":"->","args":["\/upload_tmp\/oc_tmp_dIuajV-.pdf",1024,768]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Preview\/GeneratorHelper.php","line":59,"function":"getThumbnail","class":"OC\\Preview\\Bitmap","type":"->","args":["Wegleitung zum Praktikumsbericht 2019.pdf",1024,768,false,{"__class__":"OC\\Files\\View"}]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Preview\/Generator.php","line":194,"function":"getThumbnail","class":"OC\\Preview\\GeneratorHelper","type":"->","args":[{"__class__":"OC\\Preview\\PDF"},{"__class__":"OC\\Files\\Node\\File"},1024,768]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Preview\/Generator.php","line":118,"function":"getMaxPreview","class":"OC\\Preview\\Generator","type":"->","args":[{"__class__":"OC\\Files\\SimpleFS\\SimpleFolder"},{"__class__":"OC\\Files\\Node\\File"},"application\/pdf"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/PreviewManager.php","line":205,"function":"getPreview","class":"OC\\Preview\\Generator","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},32,32,true,"fill","application\/pdf"]},{"file":"\/var\/www\/html\/nextcloud\/core\/Controller\/PreviewController.php","line":175,"function":"getPreview","class":"OC\\PreviewManager","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},32,32,true,"fill"]},{"file":"\/var\/www\/html\/nextcloud\/core\/Controller\/PreviewController.php","line":147,"function":"fetchPreview","class":"OC\\Core\\Controller\\PreviewController","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},32,32,false,true,"fill"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":166,"function":"getPreviewByFileId","class":"OC\\Core\\Controller\\PreviewController","type":"->","args":[66976,32,32,false,true,"fill"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Core\\Controller\\PreviewController"},"getPreviewByFileId"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/App.php","line":126,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Core\\Controller\\PreviewController"},"getPreviewByFileId"]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OC\\Core\\Controller\\PreviewController","getPreviewByFileId",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"core.Preview.getPreviewByFileId"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"_route":"core.Preview.getPreviewByFileId"}]},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Route\/Router.php","line":297,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"_route":"core.Preview.getPreviewByFileId"}]},{"file":"\/var\/www\/html\/nextcloud\/lib\/base.php","line":975,"function":"match","class":"OC\\Route\\Router","type":"->","args":["\/core\/preview"]},{"file":"\/var\/www\/html\/nextcloud\/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"\/var\/www\/html\/nextcloud\/lib\/private\/Preview\/Bitmap.php","Line":87,"CustomMessage":"File: \/exuser\/files\/1-2M Musik\/KLASSENSTUNDE\/Wegleitung zum Praktikumsbericht 2019.pdf Imagick says:"},"userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:68.0) Gecko\/20100101 Firefox\/68.0","version":"16.0.4.1"}

js console:

could not load recommendation preview 
error
​
bubbles: false
​
cancelBubble: false
​
cancelable: false
​
composed: false
​
currentTarget: null
​
defaultPrevented: false
​
eventPhase: 0
​
explicitOriginalTarget: <img src="/core/preview?fileId=66976&x=32&y=32">
​
isTrusted: true
​
originalTarget: <img src="/core/preview?fileId=66976&x=32&y=32">
​
returnValue: true
​
srcElement: <img src="/core/preview?fileId=66976&x=32&y=32">
​
target: <img src="/core/preview?fileId=66976&x=32&y=32">
​
timeStamp: 343523
​
type: "error"
​
<get isTrusted()>: function isTrusted()
​
<prototype>: EventPrototype { composedPath: composedPath(), stopPropagation: stopPropagation(), stopImmediatePropagation: stopImmediatePropagation(), … }
main.js:14:12140
    onerror https://cloud.example.ch/apps/recommendations/js/main.js?v=b5dd7485-8:14

@skjnldsv skjnldsv added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap needs info labels Aug 31, 2019
@kesselb
Copy link
Contributor

kesselb commented Aug 31, 2019

Not sure if we can do anything. Most of the code path belongs to sabre/dav.

public function getChild($name, $info = null) {
if (!$this->info->isReadable()) {
// avoid detecting files through this way
throw new NotFound();
}
$path = $this->path . '/' . $name;
if (is_null($info)) {
try {
$this->fileView->verifyPath($this->path, $name);
$info = $this->fileView->getFileInfo($path);
} catch (\OCP\Files\StorageNotAvailableException $e) {
throw new \Sabre\DAV\Exception\ServiceUnavailable($e->getMessage());
} catch (InvalidPathException $ex) {
throw new InvalidPath($ex->getMessage());
} catch (ForbiddenException $e) {
throw new \Sabre\DAV\Exception\Forbidden();
}
}
if (!$info) {
throw new \Sabre\DAV\Exception\NotFound('File with name ' . $path . ' could not be located');
}
if ($info['mimetype'] === 'httpd/unix-directory') {
$node = new \OCA\DAV\Connector\Sabre\Directory($this->fileView, $info, $this->tree, $this->shareManager);
} else {
$node = new \OCA\DAV\Connector\Sabre\File($this->fileView, $info, $this->shareManager);
}
if ($this->tree) {
$this->tree->cacheNode($node);
}
return $node;
}

A ServiceUnavailable is thrown if we cannot access the file properly. The exception itself is not catched anywhere else.

@szaimen
Copy link
Contributor

szaimen commented May 26, 2021

I'm closing this issue due to inactivity. If this is still happening please make sure to upgrade to the latest version. After that, feel free to reopen.

@szaimen szaimen closed this as completed May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug feature: external storage
Projects
None yet
Development

No branches or pull requests

6 participants