Files are going missing

Greetings. I am starting my own thread as I am not finding any solutions by searching. I am noticing that over a period of a few days, after photos are successfully uploaded from my iphone to my nextcloud instance, that they become unaccessible. In fact, I am seeing them no longer in nextcloud all together. The photos are still in my iphone photos though. I have a bunch of errors similar to this:
{“reqId”:“2rpsSI5xrrbGgwHpa5JJ”,“level”:3,“time”:“2024-02-12T17:21:02+00:00”,“remoteAddr”:“”,“user”:“”,“app”:“webdav”,“method”:“GET”,“url”:“/remote.php/dav/files//Photos/2024/IMG_3267.jpg”,“message”:“Could not open file”,“userAgent”:“Mozilla/5.0 (Windows NT 10.
0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36”,“version”:“28.0.2.5”,“exception”:{“Exception”:“Sabre\DAV\Exception\ServiceUnavailable”,“Message”:“Could not open file”,“Code”:0,“Trace”:[{“file”:“/app/www/public/3rdparty/sabre/dav/lib/DAV/CorePlugin.ph
p”,“line”:85,“function”:“get”,“class”:“OCA\DAV\Connector\Sabre\File”,“type”:“->”},{“file”:“/app/www/public/3rdparty/sabre/event/lib/WildcardEmitterTrait.php”,“line”:89,“function”:“httpGet”,“class”:“Sabre\DAV\CorePlugin”,“type”:“->”},{“file”:“/app/www/public/3rdparty/sabre/dav/lib/DAV/
Server.php”,“line”:472,“function”:“emit”,“class”:“Sabre\DAV\Server”,“type”:“->”},{“file”:“/app/www/public/3rdparty/sabre/dav/lib/DAV/Server.php”,“line”:253,“function”:“invokeMethod”,“class”:“Sabre\DAV\Server”,“type”:“->”},{“file”:“/app/www/public/3rdparty/sabre/dav/lib/DAV/Server.php”,"
line":321,“function”:“start”,“class”:“Sabre\DAV\Server”,“type”:“->”},{“file”:“/config/www/nextcloud/apps/dav/lib/Server.php”,“line”:370,“function”:“exec”,“class”:“Sabre\DAV\Server”,“type”:“->”},{“file”:“/config/www/nextcloud/apps/dav/appinfo/v2/remote.php”,“line”:35,“function”:“exec”,“c
lass”:“OCA\DAV\Server”,“type”:“->”},{“file”:“/app/www/public/remote.php”,“line”:172,“args”:[“/config/www/nextcloud/apps/dav/appinfo/v2/remote.php”],“function”:“require_once”}],“File”:“/config/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php”,“Line”:505,“message”:“Could not open file”,"
exception":{},“CustomMessage”:“Could not open file”}}

I can provide other logs, but am not sure what to provide. I have had this issue, plus preview issues, and I don’t recall what I did to resolve this stuff last time, but need to find a solution as I cannot offer this service to others until I have a stable working system.

I am running the linuxserver/nextcloud docker on unraid.

Nextcloud version: 28.0.2

Hey,

we’ve had this exact Issue because we hadn’t updated our php after our upgrade to 28.0.2.

The Issue was resolved when we switched from php8.1 to php8.3

hope this helps

Sorry for the delay. I am running php8.3:
php -v
PHP 8.3.4 (cli) (built: Mar 14 2024 21:24:10) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.4, Copyright (c) Zend Technologies
with Zend OPcache v8.3.4, Copyright (c), by Zend Technologies

Hello,

a quick follow up, it wasn’t just php we were running into multiple timeouts in apache2, which caused our part-files not being combined properly.

BR
Philipp

Hmm. Shouldn’t things like that get updated when nextcloud updates? I am running this in a docker container, so I don’t have much to do with it. I guess I could try to update all the software on it? But I think that may fail.

1 Like

Ok, I can get this working for like a day. I delete the preview folder under appdata, and let nextcloud re-create all of that… The next day, I can no longer access the photo files that were re-added in. The permissions show the exact same, so I don’t know what is going on here. But this is getting tiresome… Here is the error:

{“reqId”:“S9OuCKbHkIPW6GUYqv1T”,“level”:3,“time”:“2024-03-26T17:58:24+00:00”,“remoteAddr”:“IP”,“user”:“MYUSER”,“app”:“webdav”,“method”:“GET”,“url”:“/remote.php/dav/files/MY USER/Photos/2024/Photo%2024-03-17%2012-23-26%203460.jpg”,“message”:“Could not open file”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36”,“version”:“28.0.3.2”,“exception”:{“Exception”:“Sabre\DAV\Exception\ServiceUnavailable”,“Message”:“Could not open file”,“Code”:0,“Trace”:[{“file”:“/app/www/public/3rdparty/sabre/dav/lib/DAV/CorePlugin.php”,“line”:85,“function”:“get”,“class”:“OCA\DAV\Connector\Sabre\File”,“type”:“->”},{“file”:“/app/www/public/3rdparty/sabre/event/lib/WildcardEmitterTrait.php”,“line”:89,“function”:“httpGet”,“class”:“Sabre\DAV\CorePlugin”,“type”:“->”},{“file”:“/app/www/public/3rdparty/sabre/dav/lib/DAV/Server.php”,“line”:472,“function”:“emit”,“class”:“Sabre\DAV\Server”,“type”:“->”},{“file”:“/app/www/public/3rdparty/sabre/dav/lib/DAV/Server.php”,“line”:253,“function”:“invokeMethod”,“class”:“Sabre\DAV\Server”,“type”:“->”},{“file”:“/app/www/public/3rdparty/sabre/dav/lib/DAV/Server.php”,“line”:321,“function”:“start”,“class”:“Sabre\DAV\Server”,“type”:“->”},{“file”:“/config/www/nextcloud/apps/dav/lib/Server.php”,“line”:373,“function”:“exec”,“class”:“Sabre\DAV\Server”,“type”:“->”},{“file”:“/config/www/nextcloud/apps/dav/appinfo/v2/remote.php”,“line”:35,“function”:“exec”,“class”:“OCA\DAV\Server”,“type”:“->”},{“file”:“/app/www/public/remote.php”,“line”:172,“args”:[“/config/www/nextcloud/apps/dav/appinfo/v2/remote.php”],“function”:“require_once”}],“File”:“/config/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php”,“Line”:505,“message”:“Could not open file”,“exception”:,“CustomMessage”:“Could not open file”},“id”:“66030cc840a13”}

Bumping as I am at my wits end with this. I don’t understand what I need to do to keep this thing up and running properly. I can temporarily fix this, but the issue just returns a day or so later.

Are there any jobs that are setup within the docker that repairs permissions or something?

Bumping. Still would like to get this resolved. What am I messing up, or missing that is causing this to routinely start failing? What is it specifically complaining about? I mean outside of could not open file. Why? if I purge the app data preview folder, everything works for like a day. This same file will show up just fine.

Do I need to just start over? Is there documentation on how I can do that, and re-sync everything? Obviously I don’t want to lose any data.

You appear to be using a third-party Nextcloud image (from LinuxServer.io if I had to take a guess).

Please post your Docker Compose and your Nextcloud config (i.e. occ config:list system).

Also, when posting output (log entries, configs, etc.) please mark that output as preformatted text in the editor so that it remains readable.

What is it specifically complaining about? I mean outside of could not open file. Why? if I purge the app data preview folder, everything works for like a day. This same file will show up just fine.

It really is essentially inability to open the file for reading:

Though the specifics depending the underlying storage type.

Is /Photos just a folder in that user’s home directory or is it External Storage or anything along those lines?

You’re correct. Here is the output:

{
    "system": {
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "IP",
            "URL",
            "IP"
        ],
        "dbtype": "pgsql",
        "version": "28.0.4.1",
        "overwrite.cli.url": "https:\/\/<URL>",
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "filelocking.enabled": "false",
        "memcache.locking": "\\OC\\Memcache\\APCu",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [],
        "twofactor_enforced_excluded_groups": [],
        "maintenance": false,
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "mysql.utf8mb4": true,
        "default_phone_region": "EN",
        "loglevel": 2,
        "upgrade.disable-web": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\OpenDocument",
            "OC\\Preview\\Krita",
            "OC\\Preview\\HEIC"
        ],
        "maintenance_window_start": 1
    }
}

The /photos folder is a folder that is a part of the host filesystem that the docker points to. There are other folders outside of the photos folder that works just fine. It’s something about the preview I believe.

I use unraid for docker. Do I don’t really have a compose file to provide. I can copy in the template if that would help any?

Bumping. Still running in to issues… Is this just a permissions issue? If so, I am not sure how they could have been messed up? what permissions do I need to fix if so?

Looking through permissions. I found something rather odd… So the error I get is this:
{“reqId”:“64aKCZj3F4AikCbQfJfI”,“level”:3,“time”:“2024-04-16T19:02:38+00:00”,“remoteAddr”:“”,“user”:“,“app”:“webdav”,“method”:“GET”,“url”:”/remote.php/dav/files/username/Photos/2024/Photo%2024-04-12%2011-52-40%203544.jpg",“message”:“Could not open file”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36”,“version”:“28.0.4.1”,“exception”:{“Exception”:“Sabre\DAV\Exception\ServiceUnavailable”,“Message”:“Could not open file”,“Code”:0,“Trace”:[{“file”:“/app/www/public/3rdparty/sabre/dav/lib/DAV/CorePlugin.php”,“line”:85,“function”:“get”,“class”:“OCA\DAV\Connector\Sabre\File”,“type”:“->”},{“file”:“/app/www/public/3rdparty/sabre/event/lib/WildcardEmitterTrait.php”,“line”:89,“function”:“httpGet”,“class”:“Sabre\DAV\CorePlugin”,“type”:“->”},{“file”:“/app/www/public/3rdparty/sabre/dav/lib/DAV/Server.php”,“line”:472,“function”:“emit”,“class”:“Sabre\DAV\Server”,“type”:“->”},{“file”:“/app/www/public/3rdparty/sabre/dav/lib/DAV/Server.php”,“line”:253,“function”:“invokeMethod”,“class”:“Sabre\DAV\Server”,“type”:“->”},{“file”:“/app/www/public/3rdparty/sabre/dav/lib/DAV/Server.php”,“line”:321,“function”:“start”,“class”:“Sabre\DAV\Server”,“type”:“->”},{“file”:“/config/www/nextcloud/apps/dav/lib/Server.php”,“line”:373,“function”:“exec”,“class”:“Sabre\DAV\Server”,“type”:“->”},{“file”:“/config/www/nextcloud/apps/dav/appinfo/v2/remote.php”,“line”:35,“function”:“exec”,“class”:“OCA\DAV\Server”,“type”:“->”},{“file”:“/app/www/public/remote.php”,“line”:172,“args”:[“/config/www/nextcloud/apps/dav/appinfo/v2/remote.php”],“function”:“require_once”}],“File”:“/config/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php”,“Line”:505,“message”:“Could not open file”,“exception”:,“CustomMessage”:“Could not open file”},“id”:“661ecb58b5474”}

Looking in unraid, where I have the nextcloud storage, I don’t see a files/username/Photos.

I see /nextcloud/username/files/Photos. In the container for nextcloud, I see the same thing under the /data folder. Is webdav looking in the wrong folder for the file?

Also, the file that webdav is looking for is not even on the filesystem. But it IS on my phone’s nextcloud instance. I also fixed some permissions to be more wide open, so perhaps clearing the preview data or something may resolve this?

Bumping, as the issue is still here, and I really need to find a solution to this, or find another solution for a private cloud…