Your one-stop-cake-shop for everything Freshly Baked has to offer

feat(copyparty): set library unix permissions #105

merged
opened by a.starrysky.fyi targeting main from private/minion/push-wznllvxvuqmz

Without these, Kavita cannot access files in the library properly

0
by a.starrysky.fyi 0 comments
expand 1 commit
feat(copyparty): set library unix permissions
expand 1 commit
feat(copyparty): set library unix permissions
expand 1 commit
feat(copyparty): set library unix permissions

This works fine on upload, but it seems like restarting resets permissions - I'm not quite clear why (perhaps StateDirectory is the reason?)

Except in case of ConfigurationDirectory=, the innermost specified directories will be owned by the user and group specified in User= and Group=. If the specified directories already exist and their owning user or group do not match the configured ones, all files and directories below the specified directories as well as the directories themselves will have their file ownership recursively changed to match what is configured. As an optimization, if the specified directories are already owned by the right user and group, files and directories below of them are left as-is, even if they do not match what is requested. The innermost specified directories will have their access mode adjusted to the what is specified in RuntimeDirectoryMode=, StateDirectoryMode=, CacheDirectoryMode=, LogsDirectoryMode= and ConfigurationDirectoryMode=.

yep.

So I think the fix to this is to avoid setting permissions on /var/lib/copyparty/data/groups/library, and to instead do it like so:

chown -R copyparty:copyparty+kavita /var/lib/copyparty/data/groups/library/*

probably we should codify this in a preStart or something... @thecoded.prof any thoughts?

actually, the true fix is to move it out of /var/lib/copyparty - particularly since as kavita can't read it anyway because it doesn't have +x on everything above it...

sign up or login to add to the discussion
expand 1 commit
feat(copyparty): set library unix permissions
expand 1 commit
feat(copyparty): set library unix permissions
expand 1 commit
feat(copyparty): set library unix permissions
expand 1 commit
feat(copyparty): set library unix permissions
expand 1 commit
feat(copyparty): set library unix permissions
Labels
merge-when-green
requested-reviewers
thecoded.prof
approved

None yet.

tested-working
a.starrysky.fyi
rejected

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:uuyqs6y3pwtbteet4swt5i5y/sh.tangled.repo.pull/3m4sa2v3elw22