davis icon indicating copy to clipboard operation
davis copied to clipboard

Permission denied when adding a calendar entry

Open Slydder opened this issue 7 months ago • 8 comments

Get the following error when trying to add a calendar entry. this is wit imap auth. and a none docker install.

[2025-05-09T18:11:19.551499+02:00] request.INFO: Matched route "dav". {"route":"dav","route_parameters":{"_route":"dav","_controller":"App\Controller\DAVController::dav","path":"9c2db8d1cc9c512722ccfa8d09da6310d97722aa.ics"},"request_uri":"http://10.140.1.21/dav/9c2db8d1cc9c512722ccfa8d09da6310d97722aa.ics","method":"PUT"} [] [2025-05-09T18:11:19.555882+02:00] security.DEBUG: Checking for authenticator support. {"firewall_name":"main","authenticators":1} [] [2025-05-09T18:11:19.555922+02:00] security.DEBUG: Checking support on authenticator. {"firewall_name":"main","authenticator":"App\Security\LoginFormAuthenticator"} [] [2025-05-09T18:11:19.555945+02:00] security.DEBUG: Authenticator does not support the request. {"firewall_name":"main","authenticator":"App\Security\LoginFormAuthenticator"} [] [2025-05-09T18:11:19.848467+02:00] app.ERROR: [403]: Sabre\DAV\Exception\Forbidden - Permission denied to create file (filename 9c2db8d1cc9c512722ccfa8d09da6310d97722aa.ics) [{"file":"/var/www/davis/vendor/sabre/dav/lib/DAV/Server.php","line":1098,"function":"createFile","class":"Sabre\DAV\Collection","type":"->"},{"file":"/var/www/davis/vendor/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\DAV\Server","type":"->"},{"file":"/var/www/davis/vendor/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\DAV\CorePlugin","type":"->"},{"file":"/var/www/davis/vendor/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\DAV\Server","type":"->"},{"file":"/var/www/davis/vendor/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\DAV\Server","type":"->"},{"file":"/var/www/davis/src/Controller/DAVController.php","line":333,"function":"start","class":"Sabre\DAV\Server","type":"->"},{"file":"/var/www/davis/vendor/symfony/http-kernel/HttpKernel.php","line":183,"function":"dav","class":"App\Controller\DAVController","type":"->"},{"file":"/var/www/davis/vendor/symfony/http-kernel/HttpKernel.php","line":76,"function":"handleRaw","class":"Symfony\Component\HttpKernel\HttpKernel","type":"->"},{"file":"/var/www/davis/vendor/symfony/http-kernel/Kernel.php","line":182,"function":"handle","class":"Symfony\Component\HttpKernel\HttpKernel","type":"->"},{"file":"/var/www/davis/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php","line":35,"function":"handle","class":"Symfony\Component\HttpKernel\Kernel","type":"->"},{"file":"/var/www/davis/vendor/autoload_runtime.php","line":29,"function":"run","class":"Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner","type":"->"},{"file":"/var/www/davis/public/index.php","line":10,"args":["/var/www/davis/vendor/autoload_runtime.php"],"function":"require_once"}] []

Slydder avatar May 09 '25 14:05 Slydder

my question is where the hell is it trying to even write to?

am guessing the .well-known/(caldav|carddav) directories. under public or what?

Slydder avatar May 09 '25 14:05 Slydder

Hey @Slydder

You can var_dump($...) the path in /var/www/davis/vendor/sabre/dav/lib/DAV/Server.php to see what it is exactly. It might be one of the webdav directories set in your config.

tchapi avatar May 13 '25 07:05 tchapi

The only mention of a path in the installation is the webdav path and temp directory for webdav. which is MAYBE somehow might be connected to the caldav/carddav side of things. quite unclear from the documentation. and if the path does need to be added somewhere then where and do I need to create the directory structure and what permissions need to be active.

I did a var_dump on path but it was empty. not sure where to go from here.

Slydder avatar May 13 '25 10:05 Slydder

Hey @Slydder

You can var_dump($...) the path in /var/www/davis/vendor/sabre/dav/lib/DAV/Server.php to see what it is exactly. It might be one of the webdav directories set in your config.

Just switched over to a docker install and apparently the imap login variable is also different.

Slydder avatar May 13 '25 13:05 Slydder

Also missing apache configs for default docker install.

Slydder avatar May 13 '25 13:05 Slydder

ok. it seems that accessing IP_ADDRESS/dav no redirects to localhost/dav. which I am sure is not what should happen. the apache config I am using is quite simple and just proxypass's to localhost:9000

and accessing IP_ADDRESS:9000/dav gets a 403 error from the nginx container

will try the standalone image now with caddy even though it seems to be based on a different version of things.

Slydder avatar May 13 '25 14:05 Slydder

Just switched over to a docker install and apparently the imap login variable is also different.

What do you mean?

Also missing apache configs for default docker install.

There's an example apache config here → https://github.com/tchapi/davis/blob/main/README.md#example-apache-24-configuration If it's not working or outdated, don't hesitate to provide a PR (I'm not using Apache myself, so I'm not an expert on it)

tchapi avatar May 13 '25 20:05 tchapi

Just switched over to a docker install and apparently the imap login variable is also different.

What do you mean?

IMAP login doesn't work with either of the docker installs. not sure what is going on there but have decided to go back to the normal install for now. at least I can get logged in.

Also missing apache configs for default docker install.

There's an example apache config here → https://github.com/tchapi/davis/blob/main/README.md#example-apache-24-configuration If it's not working or outdated, don't hesitate to provide a PR (I'm not using Apache myself, so I'm not an expert on it)

yeah. that is the config for the normal install and not for proxying to docker.

Slydder avatar May 14 '25 07:05 Slydder