Radicale icon indicating copy to clipboard operation
Radicale copied to clipboard

sharing calendar or adressbook does not work

Open chris-fh opened this issue 4 years ago • 9 comments

my rights file looks like this:

[auread]
user: .+
collection: .*
permissions: Rr

[chris]
user: chris
collection: .* 
permissions: RrWw

[admin]
user: admin
collection: .*
permissions: RrWw

this is what the log says:

[2021-01-15 09:52:53 +0000] [1/Thread-192] [INFO] PROPFIND request for '/chris/' with depth '1' received from '10.0.1.36' (forwarded by 172.19.0.2) using 'Mac+OS+X/10.14.6 (18G6032) CalendarAgent/416.5.2'
[2021-01-15 09:52:53 +0000] [1/Thread-192] [INFO] Rights: '':'chris' doesn't match any section
[2021-01-15 09:52:53 +0000] [1/Thread-192] [INFO] Rights: '':'' doesn't match any section
[2021-01-15 09:52:53 +0000] [1/Thread-192] [INFO] Access to '/chris/' denied for anonymous user
[2021-01-15 09:52:53 +0000] [1/Thread-192] [INFO] PROPFIND response status for '/chris/' with depth '1' in 0.003 seconds: 401 Unauthorized
[2021-01-15 09:52:53 +0000] [1/Thread-193] [INFO] PROPFIND request for '/chris/' with depth '1' received from '10.0.1.36' (forwarded by 172.19.0.2) using 'Mac+OS+X/10.14.6 (18G6032) CalendarAgent/416.5.2'

what am I doing wrong? I cannot see anything in the client except my own calendar as chris. I want to be able to see everything from admin, too.

chris-fh avatar Jan 15 '21 11:01 chris-fh

There might be an easier way by now. But last time I checked (a few years ago), the easiest way for this kind of static sharing of calendars was to create symlinks in the filesystem. Let's take the following scenario: User1 has two calendars, one should be private and one should be shared with User2. Then the file structure could look as follows:

├── collection-root
│   ├── User2
│   │   └── a53bae77-a862-4a9e-a426-8a05bf0d6711 -> ../User1/a53bae77-a862-4a9e-a426-8a05bf0d6711
│   └── User1
│       ├── a53bae77-a862-4a9e-a426-8a05bf0d6711
│       └── c39545d2-e540-7e6f-7cff-af992c350212
└── .Radicale.lock

and the config is the one from https://radicale.org/3.0.html#documentation/authentication-and-rights without changes:

# Allow reading root collection for authenticated users
[root]
user: .+
collection:
permissions: R

# Allow reading and writing principal collection (same as user name)
[principal]
user: .+
collection: {user}
permissions: RW

# Allow reading and writing calendars and address books that are direct
# children of the principal collection
[calendars]
user: .+
collection: {user}/[^/]+
permissions: rw

Such a setup works really well for me and my wife. But it would be interesting to know if there are less 'hacky' ways nowadays.

MartinSchmidt123 avatar Feb 05 '21 22:02 MartinSchmidt123

I use the same "hack" with symlinks and am very happy with it.

muellerj avatar Feb 16 '21 13:02 muellerj

Maybe it's obvious but, for the "hack" to work , make sure that the symbolinc link is owned by the user and group that runs radicale. In my case it is radicale so:

sudo ln -s /data/collections/collection-root/<user_1>/<collection_to_share>/ /data/collections/collection-root/<user_2>/<collection_to_share>
sudo chown -h radicale:radicale /data/collections/collection-root/<user_2>/<collection_to_share>

does the trick.

Timost avatar Feb 20 '21 07:02 Timost

You can use this script (to run as root) to open a shell on the radicale folder with the correct user. That way you can create files and folders and the permissions will be correct.

#!/bin/sh
cd /var/lib/radicale
cd collections
exec su -s "$SHELL" radicale

somini avatar Feb 21 '21 11:02 somini

If I, as user1, symlink a calendar into the folder for user2, should that show up in the webui when user2 signs in? I'm trying to troubleshoot, I've created a symlink and my permissions appear to be correct, but I'm not able to access the calendar as user2.

crosbyh avatar Aug 06 '21 02:08 crosbyh

This is something I'm trying to wrap my head around. My Partner and I happily use this to sync Calendars, Contacts & Tasks, but we have yet to figure out how to easily share events in particular to each other as we did when using the Google-verse. Will give the Symlinking a try but a moderately simpler method would be grand!

joshaspinall avatar Aug 31 '21 21:08 joshaspinall

Hello I just want to also vote for a simpler method. Giving the symlink a try though.

woifes avatar Dec 03 '21 08:12 woifes

If I, as user1, symlink a calendar into the folder for user2, should that show up in the webui when user2 signs in? I'm trying to troubleshoot, I've created a symlink and my permissions appear to be correct, but I'm not able to access the calendar as user2.

I have the same issue: https://github.com/Kozea/Radicale/issues/696#issuecomment-1019503253. Symlinked calendar is not showing up in web ui when logging in as user2, and it's not available in my local CalDav client (Apple Calendar).

Jip-Hop avatar Jan 23 '22 15:01 Jip-Hop

+1 for simpler sharing (and discoverability).

VividVisions avatar Feb 02 '23 15:02 VividVisions