PUT operation causes Sabre DAV Exception Forbidden exeption

I have upgraded nextcloud from version 18 to version 24 in short order and now am running into problems with file syncing.

I use the linux nextcloud-client client and FolderSync on android, both seem to have the same problem. And the problem happened with the server upgrade.

When I try to push a file to the server, the http PUT seems to have a problem. This is an entry from
the nextlcoud.log:

{
“reqId”:“YsnUwpQOc8y5nnzf9f6N2wAAAAY”,
“level”:0,
“time”:“2022-07-09T19:19:30+00:00”,
“remoteAddr”:“192.168.42.42”,
“user”:“marcus-sync”,
“app”:“webdav”,
“method”:“PUT”,
“url”:"/nextcloud/remote.php/dav/files/marcus-sync/keepass/keepass.kdbx",
“message”:"",
“userAgent”:“Mozilla/5.0 (Linux) mirall/3.5.1git (Nextcloud, fedora-5.18.9-200.fc36.x86_64 ClientArchitecture: x86_64 OsArchitecture: x86_64)”,
“version”:“24.0.1.1”,
“exception”:{
“Exception”:“Sabre\DAV\Exception\Forbidden”,
“Message”:"",
“Code”:0,
“Trace”:[
{
“file”:"/var/www/tuells/nextcloud-24/3rdparty/sabre/dav/lib/DAV/Server.php",
“line”:1098,
“function”:“createFile”,
“class”:“OCA\DAV\Connector\Sabre\Directory”,
“type”:"->"},
{
“file”:"/var/www/tuells/nextcloud-24/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
“line”:504,
“function”:“createFile”,
“class”:“Sabre\DAV\Server”,
“type”:"->"},
{
“file”:"/var/www/tuells/nextcloud-24/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
“line”:89,
“function”:“httpPut”,
“class”:“Sabre\DAV\CorePlugin”,
“type”:"->"},
{
“file”:"/var/www/tuells/nextcloud-24/3rdparty/sabre/dav/lib/DAV/Server.php",
“line”:472,
“function”:“emit”,
“class”:“Sabre\DAV\Server”,
“type”:"->"},
{
“file”:"/var/www/tuells/nextcloud-24/3rdparty/sabre/dav/lib/DAV/Server.php",
“line”:253,
“function”:“invokeMethod”,
“class”:“Sabre\DAV\Server”,
“type”:"->"},
{
“file”:"/var/www/tuells/nextcloud-24/3rdparty/sabre/dav/lib/DAV/Server.php",
“line”:321,
“function”:“start”,
“class”:“Sabre\DAV\Server”,
“type”:"->"},
{
“file”:"/var/www/tuells/nextcloud-24/apps/dav/lib/Server.php",
“line”:352,
“function”:“exec”,
“class”:“Sabre\DAV\Server”,
“type”:"->"},
{
“file”:"/var/www/tuells/nextcloud-24/apps/dav/appinfo/v2/remote.php",
“line”:35,
“function”:“exec”,
“class”:“OCA\DAV\Server”,
“type”:"->"},
{
“file”:"/var/www/tuells/nextcloud-24/remote.php",
“line”:166,
“args”:["/var/www/tuells/nextcloud-24/apps/dav/appinfo/v2/remote.php"],
“function”:“require_once”}],
“File”:"/var/www/tuells/nextcloud-24/apps/dav/lib/Connector/Sabre/Directory.php",
“Line”:143,
“CustomMessage”:"–"}}

I did a little poking around in apps/dav/lib/Connector/Sabre/Directory.php and found that line 143 is hit when $this->fileView->isCreatable($this->path) is false. In this case, $this->path is “/keepass”, which is the directory containing the file I am trying to push. It isn’t clear if $this->path should be the full linux file path (ie, /path/to/nextcloud_data/data/[user]/files/keepass) or just the subdirectory after files, but if the path isn’t set properly, I can see where that gets into problems.

Everything in the files tree is writable by apache. If I change the permissions to 777, the problem does not go away. If I create a “keepass” directory in / and make it 777, it does not affect the problem. I’m not really sure what to try next.

Any suggestions? Or a solution?

Thanks in advance!