Webdav Sabre error: Could not open file

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 25.0.2
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.41
PHP version (eg, 7.4): 7.4.3

The issue you are facing:
Sorry guys, I’m new to nextcloud and after couple of changes, I broke my app. When I try to open a file, I get an error, as per checking this into Admin->Logging, it shows the error as mentioned in below. I am not able to open a multiple files from win client or web browser or android app as well. It shows below logs:-

Please help me to resolve this.

Is this the first time you’ve seen this error? (Y/N):Y

Steps to replicate it: I see this for multiple files not sure how to reproduce.

The output of your Nextcloud log in Admin > Logging:

	Sabre\DAV\Exception\ServiceUnavailable: Could not open file
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 85:

OCA\DAV\Connector\Sabre\File->get()

/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php - line 89:

Sabre\DAV\CorePlugin->httpGet()

/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 472:

Sabre\DAV\Server->emit()

/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 253:

Sabre\DAV\Server->invokeMethod()

/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 321:

Sabre\DAV\Server->start()

/var/www/nextcloud/apps/dav/lib/Server.php - line 360:

Sabre\DAV\Server->exec()

/var/www/nextcloud/apps/dav/appinfo/v2/remote.php - line 35:

OCA\DAV\Server->exec()

/var/www/nextcloud/remote.php - line 171:

require_once("/var/www/ne ... p")```

The output of your config.php file in `/path/to/nextcloud` (make sure you remove any identifiable information!):

{
“instanceid”: “REMOVED SENSITIVE VALUE”,
“passwordsalt”: “REMOVED SENSITIVE VALUE”,
“secret”: “REMOVED SENSITIVE VALUE”,
“trusted_domains”: [
“10.0.0.112” ],
“datadirectory”: “REMOVED SENSITIVE VALUE”,
“dbtype”: “mysql”,
“version”: “25.0.2.3”,
“overwrite.cli.url”: “http://10.0.0.112”,
“dbname”: “REMOVED SENSITIVE VALUE”,
“dbhost”: “REMOVED SENSITIVE VALUE”,
“dbport”: “”,
“dbtableprefix”: “oc_”,
“mysql.utf8mb4”: true,
“dbuser”: “REMOVED SENSITIVE VALUE”,
“dbpassword”: “REMOVED SENSITIVE VALUE”,
“installed”: true,
“default_locale”: “en_US”,
“default_phone_region”: “US”,
“logtimezone”: “America/New_York”,
“log_rotate_size”: 52428800,
“htaccess.RewriteBase”: “/”,
“twofactor_enforced”: “true”,
“twofactor_enforced_groups”: ,
“twofactor_enforced_excluded_groups”: ,
“memcache.local”: “\OC\Memcache\Redis”,
“memcache.locking”: “\OC\Memcache\Redis”,
“filelocking.enabled”: true,
“redis”: {
“host”: “REMOVED SENSITIVE VALUE”,
“port”: 0,
“timeout”: 0
}
}```

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

PASTE HERE


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

file","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":85,"function":"get","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpGet","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":360,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":171,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","Line":495,"message":"Could not open file","exception":{},"CustomMessage":"Could not open file"}}

I have figure out the problem, I might have changed a permission at truenas directory to different user so it was not letting me do anything in this directory,. This was changed to particular user only and after changing into www-data it resolved