[Digikam-users] How to keep digiKam from deleting image files

Elle Stone l.elle.stone at gmail.com
Fri Jun 21 21:03:33 BST 2013

On 6/20/13, Christoph Siedentop <christoph at siedentop.name> wrote:

> is this running on Linux or Windows? Also what version of digikam are you
> using?
I'm using digiKam 3.2 running under Gentoo Linux.

> This is of course not what should happen. But normally the operating system
> protects files from being deleted.
Alas it turns out to not be true that under Linux making a file
"read-only" automatically protects the file from being deleted.
"Read-only" only protects the file from being modified. If you own the
folder the image is in, you can delete it. Try for yourself!

Apparently under Windows you can make a file "read-only +
do-not-delete", but not under Linux, because of the way Linux file
permissions work.

There is a workaround for this unfortunate situation, involving
creating a new user, transferring ownership of the to-be-protected
image files to the new user, and setting a "sticky bit" on all the
folders that contain the files to be protected. This protects the
image files from everyone (except the new user, and you need to "sudo
su" to become the new user). So the regular user doesn't have to worry
about accidentally deleting image files. If anyone is interested, I
can post the relevant commands.

It seems to me that having the option to delete images rather than
merely send them to the trash is quite dangerous, nice to have for
those who want it, but it should be something that can be disabled at
will for those who don't want to run the risk. To prevent the
accidental deletion of read-only files for those digikam users who
never, ever use digikam to delete images, would the digiKam developers
be willing to add the user option to completely disable the ability to
delete files using digikam?

Kind regards,
Elle Stone

More information about the Digikam-users mailing list