Skip to content

Uploading to shared public upload-only Folder fails: Could not rename part file to final file #8942

Closed

Description

@gnunicorn

Steps to reproduce

  1. create a folder, share it via link, on upload-only
  2. open the link in a second, private browser session and try to upload any file

Expected behaviour

The file should be uploaded and made available in the directory.

Actual behaviour

The error-message "File could not be uploaded" appears.

Additional Information

It works if I put the sharing on 'upload and edit', but I don't people to be able to edit.

Server configuration detail

Operating system: Linux 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64

Webserver: nginx/1.13.7 (fpm-fcgi)

Database: pgsql PostgreSQL 10.3 (Debian 10.3-1.pgdg90+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit

PHP version: 7.1.15
Modules loaded: Core, date, libxml, openssl, pcre, sqlite3, zlib, ctype, curl, dom, fileinfo, filter, ftp, hash, iconv, json, mbstring, SPL, PDO, session, posix, readline, Reflection, standard, SimpleXML, pdo_sqlite, Phar, tokenizer, xml, xmlreader, xmlwriter, mysqlnd, cgi-fcgi, apcu, exif, gd, intl, ldap, mcrypt, memcached, mysqli, pcntl, pdo_mysql, pdo_pgsql, pgsql, redis, zip, Zend OPcache

Nextcloud version: 13.0.1 - 13.0.1.1

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from: docker

Signing status

Array

List of activated apps
Enabled:
 - admin_audit: 1.3.0
 - admin_notifications: 1.0.1
 - announcementcenter: 3.2.1
 - apporder: 0.4.1
 - bruteforcesettings: 1.0.3
 - calendar: 1.6.1
 - caniupdate: 0.1.2
 - comments: 1.3.0
 - contacts: 2.1.2
 - dav: 1.4.6
 - encryption: 2.0.0
 - federatedfilesharing: 1.3.1
 - federation: 1.3.0
 - files: 1.8.0
 - files_frommail: 0.1.0
 - files_markdown: 2.0.4
 - files_pdfviewer: 1.2.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
 - groupfolders: 1.2.0
 - issuetemplate: 0.3.0
 - logreader: 2.0.0
 - lookup_server_connector: 1.1.0
 - metadata: 0.6.0
 - nextcloud_announcements: 1.2.0
 - notes: 2.3.2
 - notifications: 2.1.2
 - oauth2: 1.1.0
 - onlyoffice: 1.2.0
 - ownbackup: 17.5.0
 - passman: 2.1.4
 - password_policy: 1.3.0
 - piwik: 0.3.2
 - polls: 0.8.1
 - provisioning_api: 1.3.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
 - workflowengine: 1.3.0
Disabled:
 - activity
 - external
 - files_accesscontrol
 - files_clipboard
 - files_external
 - gallery
 - ldapcontacts
 - ldaporg
 - quota_warning
 - rainloop
 - registration
 - twofactor_totp
 - unsplash
 - user_external
 - user_ldap

Configuration (config/config.php)
{
    "memcache.local": "\\OC\\Memcache\\APCu",
    "apps_paths": [
        {
            "path": "\/var\/www\/html\/apps",
            "url": "\/apps",
            "writable": false
        },
        {
            "path": "\/var\/www\/html\/custom_apps",
            "url": "\/custom_apps",
            "writable": true
        }
    ],
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "wolke.bewegung.jetzt"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "overwrite.cli.url": "https:\/\/wolke.bewegung.jetzt",
    "dbtype": "pgsql",
    "version": "13.0.1.1",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "mail_smtpmode": "smtp",
    "mail_smtpauthtype": "LOGIN",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "25",
    "mail_smtptimeout": 30,
    "ldapIgnoreNamingRules": false,
    "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
    "maintenance": false,
    "updater.release.channel": "stable",
    "mail_smtpauth": 1,
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "theme": "",
    "loglevel": 0,
    "updater.secret": "***REMOVED SENSITIVE VALUE***"
}

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption: no

Client configuration

Browser: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0

Operating system: Arch Linux

Logs

Nextcloud logged Error
Insert your Nextcloud log here

Fatal | webdav | Sabre\DAV\Exception: Could not rename part file to final file/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php - line 151:  OCA\DAV\Connector\Sabre\File->put(Resource id #15)/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php - line 1096:  OCA\DAV\Connector\Sabre\Directory->createFile('hand-middle.png', Resource id #15)/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 525:  Sabre\DAV\Server->createFile('hand-middle.png', Resource id #15, NULL)[internal function] Sabre\DAV\CorePlugin->httpPut(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))/var/www/html/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105:  call_user_func_array(Array, Array)/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php - line 479:  Sabre\Event\EventEmitter->emit('method PUT', Array)/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php - line 254:  Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))/var/www/html/apps/dav/appinfo/v1/publicwebdav.php - line 107:  Sabre\DAV\Server->exec()/var/www/html/public.php - line 79:  require_once('/var/www/html/a...'){main} | 2018-03-22T12:25:17+0100
-- | -- | -- | --
Error | webdav | renaming part file to final file failed ($run: true, $renameOkay: false, $fileExists: false) | 2018-03-22T12:25:17+0100


HTTP Response The console tells me the server responds with a Internal Server Error 500: ``` Sabre\DAV\Exception Could not rename part file to final file ```

Activity

  1. added
    stale
    on Jun 20, 2018
  2. MorrisJobke commented on Jun 28, 2018

    @MorrisJobke
    Member

    Could be related to #8978.

    @gnunicorn Could you post the entry from the nextcloud.log that contains the mentioned log entries?

    Sabre\DAV\Exception: Could not rename part file to final file/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php
     - line 151:  OCA\DAV\Connector\Sabre\File->put(Resource id #15)/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php
     - line 1096:  OCA\DAV\Connector\Sabre\Directory->createFile('hand-middle.png', Resource id #15)/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php
     - line 525:  Sabre\DAV\Server->createFile('hand-middle.png', Resource id #15, NULL)[internal function] Sabre\DAV\CorePlugin->httpPut(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))/var/www/html/3rdparty/sabre/event/lib/EventEmitterTrait.php
     - line 105:  call_user_func_array(Array, Array)/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php
     - line 479:  Sabre\Event\EventEmitter->emit('method PUT', Array)/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php
     - line 254:  Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))/var/www/html/apps/dav/appinfo/v1/publicwebdav.php
     - line 107:  Sabre\DAV\Server->exec()/var/www/html/public.php
     - line 79:  require_once('/var/www/html/a...'){main}
      | 2018-03-22T12:25:17+0100
    
  3. removed
    stale
    on Jun 28, 2018
  4. MorrisJobke commented on Jun 28, 2018

    @MorrisJobke
    Member

    Nextcloud version: 13.0.1 - 13.0.1.1

    Just noticed that you are not on the latest patch level. We fixed some stuff in 13.0.4. So please upgrade first and then check again. If this still happens we are happy to reopen this ticket here.

  5. gnunicorn commented on Jun 28, 2018

    @gnunicorn
    Author

    Thanks for taking the time, @MorrisJobke

    Just noticed that you are not on the latest patch level.

    Well, we were -- back then patch level was 1.1. And we are experiencing that on the latest patch level, too. We are running 13.0.4 now and still see this problem.

    If this still happens we are happy to reopen this ticket here.

    Please do.

    Could be related to #8978.

    While I am not sure about the reasons behind #8978, and therefore it could be related, but there is a distinct difference: we are not on SMB here. We are running the drive on ext4 directly linked into the docker container.

    Could you post the entry from the nextcloud.log that contains the mentioned log entries?

    I can't upload the entire file as it contains sensitive information. However, here are the log entries about the trial I just did:

    $ tail -n 100 nextcloud.log  | grep rename
    {"reqId":"s6OsSLMlxUoDHb6B5rSR","level":3,"time":"2018-06-28T08:30:49+00:00","remoteAddr":"172.18.0.48","user":"--","app":"webdav","method":"PUT","url":"\/public.php\/webdav\/Screen%20Shot%202018-06-21%20at%2008.48.55.png","message":"renaming part file to final file failed ($run: true, $renameOkay: false, $fileExists: false)","userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:59.0) Gecko\/20100101 Firefox\/59.0","version":"13.0.4.0"}
    {"reqId":"s6OsSLMlxUoDHb6B5rSR","level":4,"time":"2018-06-28T08:30:49+00:00","remoteAddr":"172.18.0.48","user":"--","app":"webdav","method":"PUT","url":"\/public.php\/webdav\/Screen%20Shot%202018-06-21%20at%2008.48.55.png","message":"Exception: {\"Exception\":\"Sabre\\\\DAV\\\\Exception\",\"Message\":\"Could not rename part file to final file\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/html\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Directory.php(156): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->put(Resource id #15)\\n#1 \\\/var\\\/www\\\/html\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(1096): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Directory->createFile('Screen Shot 201...', Resource id #15)\\n#2 \\\/var\\\/www\\\/html\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(529): Sabre\\\\DAV\\\\Server->createFile('Screen Shot 201...', Resource id #15, NULL)\\n#3 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPut(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#4 \\\/var\\\/www\\\/html\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#5 \\\/var\\\/www\\\/html\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(479): Sabre\\\\Event\\\\EventEmitter->emit('method:PUT', Array)\\n#6 \\\/var\\\/www\\\/html\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#7 \\\/var\\\/www\\\/html\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/publicwebdav.php(107): Sabre\\\\DAV\\\\Server->exec()\\n#8 \\\/var\\\/www\\\/html\\\/public.php(79): require_once('\\\/var\\\/www\\\/html\\\/a...')\\n#9 {main}\",\"File\":\"\\\/var\\\/www\\\/html\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/File.php\",\"Line\":213}","userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:59.0) Gecko\/20100101 Firefox\/59.0","version":"13.0.4.0"}
    
  6. MorrisJobke commented on Jun 28, 2018

    @MorrisJobke
    Member

    Nicely formatted:

    {
        "reqId": "s6OsSLMlxUoDHb6B5rSR",
        "level": 3,
        "time": "2018-06-28T08:30:49+00:00",
        "remoteAddr": "172.18.0.48",
        "user": "--",
        "app": "webdav",
        "method": "PUT",
        "url": "/public.php/webdav/Screen%20Shot%202018-06-21%20at%2008.48.55.png",
        "message": "renaming part file to final file failed ($run: true, $renameOkay: false, $fileExists: false)",
        "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0",
        "version": "13.0.4.0"
    }
    {
        "reqId": "s6OsSLMlxUoDHb6B5rSR",
        "level": 4,
        "time": "2018-06-28T08:30:49+00:00",
        "remoteAddr": "172.18.0.48",
        "user": "--",
        "app": "webdav",
        "method": "PUT",
        "url": "/public.php/webdav/Screen%20Shot%202018-06-21%20at%2008.48.55.png",
        "message": "Exception: {\"Exception\":\"Sabre\\\\DAV\\\\Exception\",\"Message\":\"Could not rename part file to final file\",\"Code\":0,\"Trace\":\"#0 \\/var\\/www\\/html\\/apps\\/dav\\/lib\\/Connector\\/Sabre\\/Directory.php(156): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->put(Resource id #15)\\n#1 \\/var\\/www\\/html\\/3rdparty\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(1096): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Directory->createFile('Screen Shot 201...', Resource id #15)\\n#2 \\/var\\/www\\/html\\/3rdparty\\/sabre\\/dav\\/lib\\/DAV\\/CorePlugin.php(529): Sabre\\\\DAV\\\\Server->createFile('Screen Shot 201...', Resource id #15, NULL)\\n#3 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPut(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#4 \\/var\\/www\\/html\\/3rdparty\\/sabre\\/event\\/lib\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#5 \\/var\\/www\\/html\\/3rdparty\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(479): Sabre\\\\Event\\\\EventEmitter->emit('method:PUT', Array)\\n#6 \\/var\\/www\\/html\\/3rdparty\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#7 \\/var\\/www\\/html\\/apps\\/dav\\/appinfo\\/v1\\/publicwebdav.php(107): Sabre\\\\DAV\\\\Server->exec()\\n#8 \\/var\\/www\\/html\\/public.php(79): require_once('\\/var\\/www\\/html\\/a...')\\n#9 {main}\",\"File\":\"\\/var\\/www\\/html\\/apps\\/dav\\/lib\\/Connector\\/Sabre\\/File.php\",\"Line\":213}",
        "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0",
        "version": "13.0.4.0"
    }
    

    @icewind1991 Any idea what the background of this is?

  7. scanom commented on May 28, 2019

    @scanom

    I'm experiencing the same issue, if I set a folder as upload-only the upload fails but as soon as I change the folder to upload and download the issue dissappears.

    {
      "reqId":"XO0lJsg0quS21BuGkbs3yAAAAEk",
      "level":3,
      "time":"2019-05-28T12:10:35+00:00",
      "remoteAddr":"xxx.xxx.xxx.xxx",
      "user":"--",
      "app":"webdav",
      "method":"PUT",
      "url":"\/public.php\/webdav\/SmartConsole.exe",
      "message":"renaming part file to final file failed $renameOkay: false, $fileExists: false)",
      "userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/74.0.3729.169 Safari\/537.36",
      "version":"15.0.8.1"
    }
    {
      "reqId":"XO0lJsg0quS21BuGkbs3yAAAAEk",
      "level":4,
      "time":"2019-05-28T12:10:35+00:00",
      "remoteAddr":"xxx.xxx.xxx.xxx",
      "user":"--",
      "app":"webdav",
      "method":"PUT",
      "url":"\/public.php\/webdav\/SmartConsole.exe",
      "message":{"Exception":"Sabre\\DAV\\Exception","Message":"Could not rename part file to final file","Code":0,"Trace":[{"file":"\/var\/www\/html\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/Directory.php","line":156,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[null]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":1096,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["SmartConsole.exe",null]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php","line":525,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["SmartConsole.exe",null,null]},{"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"absoluteUrl":"https:\/\/xxx.yyy.zz\/public.php\/webdav\/SmartConsole.exe","__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"},"httpPut"],[{"absoluteUrl":"https:\/\/xxx.yyy.zz\/public.php\/webdav\/SmartConsole.exe","__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:PUT",[{"absoluteUrl":"https:\/\/xxx.yyy.zz\/public.php\/webdav\/SmartConsole.exe","__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:\/\/xxx.yyy.zz\/public.php\/webdav\/SmartConsole.exe","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/var\/www\/html\/nextcloud\/apps\/dav\/appinfo\/v1\/publicwebdav.php","line":107,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"\/var\/www\/html\/nextcloud\/public.php","line":79,"args":["\/var\/www\/html\/nextcloud\/apps\/dav\/appinfo\/v1\/publicwebdav.php"],"function":"require_once"}],"File":"\/var\/www\/html\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/File.php","Line":255,"CustomMessage":"--"},
      "userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/74.0.3729.169 Safari\/537.36",
      "version":"15.0.8.1"
    }
    

    After further investigation the issue exists even using local storage, it's not related to external storage.

  8. added
    0. Needs triage
    on Jun 12, 2019
  9. scanom commented on Jun 17, 2019

    @scanom

    Same thing happennig with NC 16.0.1:

      "reqId":"XQddSYz4Z@zZ3DgO092yTAAAAAY",
      "level":3,
      "time":"2019-06-17T09:28:42+00:00",
      "remoteAddr":"xxx.xxx.xxx.xxx",,
      "user":"--",
      "app":"webdav",
      "method":"PUT",
      "url":"/public.php/webdav/ruta%20expediente%20contratation.txt",
      "message":"renaming part file to final file failed $renameOkay: false, $fileExists: false)",
      "userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0",
      "version":"16.0.1.1",
      "id":"5d075e6970411"
    }
    
    {
      "reqId":"XQddSYz4Z@zZ3DgO092yTAAAAAY",
      "level":4,
      "time":"2019-06-17T09:28:42+00:00",
      "remoteAddr":"172.16.32.46",
      "user":"--",
      "app":"webdav",
      "method":"PUT",
      "url":"/public.php/webdav/ruta%20expediente%20contratation.txt",
      "message":{"Exception":"Sabre\\DAV\\Exception","Message":"Could not rename part file to final file","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":156,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[null]},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1096,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["ruta expediente contratation.txt",null]},{"file":"/var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":525,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["ruta expediente contratation.txt",null,null]},{"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"absoluteUrl":"https://xxx.yyy.zz/public.php/webdav/ruta%20expediente%20contratation.txt","__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"},"httpPut"],[{"absoluteUrl":"https://xxx.yyy.zz/public.php/webdav/ruta%20expediente%20contratation.txt","__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:PUT",[{"absoluteUrl":"https://xxx.yyy.zz/public.php/webdav/ruta%20expediente%20contratation.txt","__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://xxx.yyy.zz/public.php/webdav/ruta%20expediente%20contratation.txt","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/nextcloud/apps/dav/appinfo/v1/publicwebdav.php","line":107,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/nextcloud/public.php","line":79,"args":["/var/www/html/nextcloud/apps/dav/appinfo/v1/publicwebdav.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/apps/dav/lib/Connector/Sabre/File.php","Line":255,"CustomMessage":"--"},
      "userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0",
      "version":"16.0.1.1",
      "id":"5d075e69703ea"
    }
    
  10. icewind1991 commented on Jun 17, 2019

    @icewind1991
    Member

    Can you try if #15769 fixes the issue

  11. scanom commented on Jun 17, 2019

    @scanom

    @icewind1991 Nope, same issue. Tried with two different files: an almost empty plain text file and a big file, same exception. If it helps, as soon as I change the shared folder to read and write permissions the file uploads perfectly fine.

    EDIT. And just noticed something curious, the files GET uploaded, just not renamed. If I rename those part files to the original filename they are perfectly fine:

    3d95ec1f822a337dc26081ac9570942f.ocTransferId133638204.part
    476da0e7e1dc8446215087dc38d8e272.ocTransferId1038867547.part
    cab709975c394ec28e26840c0f34bb14.ocTransferId1052319544.part

    I found that files after configuring an external storage and setting this 'part_file_in_storage' => false, in config file.

  12. 30 remaining items

  13. chaulota commented on Jun 30, 2021

    @chaulota

    Same here, the above patch worked for me as well.

  14. szaimen commented on Aug 8, 2021

    @szaimen
    Contributor

    Hi @Sugaroverdose, do you mind creating a PR with your patch for discussion?
    Thank you!

  15. Sugaroverdose commented on Aug 8, 2021

    @Sugaroverdose
    Contributor

    @szaimen as i said earlier, proposed workaround does actually breaks whole part file logic for url shares, so it's not a proper solution and i don't know how permissions working in nextcloud so i can't really make it anyway better, whole idea is in this quote:

    Most definitely 'isReadable' is not applicable to folder path as well as to nonexistent files, so to fix this properly eighter 'isReadable' should start to check folders for read permission, or there's should be another way to determine that current user have no permissions to access not yet created .part file

  16. added
    1. to develop
    and removed
    0. Needs triage
    on Aug 8, 2021
  17. Sugaroverdose commented on Aug 8, 2021

    @Sugaroverdose
    Contributor

    btw after thinking a little bit, whole idea of disabling .part file is kinda dumb it would be better to give restrictive per session permission for upload-only user to read it's own .part files so huge file uploads would be possible

  18. msi-tl commented on Sep 9, 2021

    @msi-tl

    This bug is already present in NC 20.0.10 and 21.0.2.
    Why is the fix not on the main branch???

  19. szaimen commented on Jan 9, 2023

    @szaimen
    Contributor

    Hi, please update to 24.0.8 or better 25.0.2 and report back if it fixes the issue. Thank you!

  20. added
    0. Needs triage
    and removed
    1. to develop
    on Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagebugfeature: filesystemneeds info

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions