mirror of
https://github.com/photoprism/photoprism.git
synced 2026-03-02 22:57:18 -05:00
Config: Allow customization of database backup file permissions #2287
Labels
No labels
ai
android
api
auth
awesome
bug
bug
ci
cli
config
database
declined
deprecated
docker
docs 📚
documents
duplicate
easy
enhancement
enhancement
enhancement
epic
faces
feedback wanted
frontend
hacktoberfest
help wanted
idea
in-progress
incomplete
index
invalid
ios
labels
live
live
low-priority
macos
member-feature
metadata
mobile
nas
needs-analysis
no-coding-required
no-coding-required
observability
performance
places
please-test
plus-feature
priority
pro-feature
question
raspberry-pi
raw
released
released
released
research
resolved
security
sharing
tested
tests
third-party-issue
thumbnails
upgrade
upstream-issue
ux
vector
video
waiting
won't fix
won't fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/photoprism#2287
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dannyadair on GitHub (Mar 29, 2025).
Describe what problem this solves and why this would be valuable to many users
At the moment, files written to the "storage" directory are owned by the photoprism user but readable by all.
Database backups - by default also written to the "storage" directory - are not readable by anyone other than the photoprism user.
This can be a pain for syncing/backing up.
The confidentiality of the database/metadata is arguably only slightly higher than that of the actual photos.
While I think that the current permissions are a good default, it would be nice to allow backups to be readable by all.
Describe the solution you'd like
A new setting
PHOTOPRISM_BACKUP_WORLDREADABLEor similar which is "false" by default. If "true", read access of backup files should be extended to group and all.Describe alternatives you've considered
PHOTOPRISM_BACKUP_PRIVATEwhich is "true" by default. :)PHOTOPRISM_BACKUP_FILEMASKto configure file permissions precisely (defaulting to the current 600)Additional context
I'm using Syncthing to keep all relevant data in another location (basically as a backup). "originals" and "storage" just needed a hidden
.stfolderdirectory owned by the syncthing user, but the database backup files themselves are currently still inaccessible to the syncthing user. Adjusting permissions after running a backup seems like a sledgehammer workaround, it could be a feature and I feel it should be fairly easy to implement.Thank you for your consideration!
@lastzero commented on GitHub (Mar 30, 2025):
This is intentional, as the database dumps contain not only picture and album metadata, but also (strongly hashed, yes) passwords and other personal data that you might not want to share with the world. So while we could add a setting when we have time (right now we really need to work on other issues like improving AI capabilities and batch editing...), I'm not sure to what extent the convenience could lead to disasters... especially on shared servers? 🤔
@dannyadair commented on GitHub (Mar 30, 2025):
Thanks Michael, fair enough (though there is also a false sense of security of your photos and thumbnails, why should they be readable by others)
I shall run a chmod cronjob after the backup job for my purposes.
Very excited about the upcoming features after the spring clean! :)
Esp. the sharing/multiuser features I see in the pipeline.
@lastzero commented on GitHub (Mar 31, 2025):
They won't if you change the umask, e.g. via
PHOTOPRISM_UMASK:https://docs.photoprism.app/getting-started/config-options/#docker-image
Thanks! We're doing our best to work through the feature requests and open pull requests, most of which were merged/resolved last week and are now ready for testing: