Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No more making db backups and snapshots read-only for the user #18156

Merged

Conversation

victoryforce
Copy link
Collaborator

Making the backup unwritable for the user did not solve any real problem ("accidental damage of the backup" is a highly hypothetical scenario, not a real problem), but it caused problems for inattentive users.

#18124 protects against already created unwritable backups restored to read-only databases. Also, the comments in the mentioned PR contain links to reports where read-only databases were found to be the cause of problems.

If this PR will be merged for 5.0.1 it will reduce the number of incidents with read-only databases (given that protection against running darktable with such databases will only be in 5.2).

@wpferguson
Copy link
Member

Making them read only prevents you from inadvertently deleting them. If you want to delete a read only database, you have to confirm it.

But, I do agree that most users using a backup copy probably don't realize that they have to make it writable.

@victoryforce
Copy link
Collaborator Author

Making them read only prevents you from inadvertently deleting them. If you want to delete a read only database, you have to confirm it.

As I wrote, this is a highly hypothetical scenario. Let's imagine a user who browsed to the darktable database location for some reason, and then inadvertently(!) deleted the backups.

If a user can inadvertently delete files in that location, they can also inadvertently delete all their other files: photos, documents, the entire contents of ~/. Then, using this logic, it makes sense to make all other files read-only.

But, I do agree that most users using a backup copy probably don't realize that they have to make it writable.

That's right. Even Linux users don't necessarily think to look at permissions. As for Windows users, it's a total fantasy.

@TurboGit TurboGit added this to the 5.0.1 milestone Jan 6, 2025
src/common/database.c Outdated Show resolved Hide resolved
@victoryforce victoryforce force-pushed the make-db-backups-writable branch from e09c32b to e84c29b Compare January 6, 2025 17:22
@TurboGit TurboGit merged commit f526537 into darktable-org:master Jan 6, 2025
6 checks passed
@TurboGit
Copy link
Member

TurboGit commented Jan 6, 2025

Thanks, merged in master and 5.0.x branch.

@victoryforce victoryforce deleted the make-db-backups-writable branch January 6, 2025 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants