Bug 306454 - rotated images gets wrong permission
Summary: rotated images gets wrong permission
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Import-PostProcessing (show other bugs)
Version: 2.6.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-08 14:41 UTC by Roger Larsson
Modified: 2017-08-16 06:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.0.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roger Larsson 2012-09-08 14:41:00 UTC
Very strange bug
Imported images from CF memory card to a shared directory.
My wife could not read all images. Noted that rotated images where not readable.
Further investigation showed that their group and other permissions was disabled
landscape pictures -rw-r--r--
portrait pictures -rw-------

Reproducible: Always

Steps to Reproduce:
1. Import from memory card
2.Check permissions
3.



Will test this further later...
Regression in 2.6.0 - never seen this before have worked like this for years...
Comment 1 caulier.gilles 2012-09-08 15:07:03 UTC
What's your host file system ?

Can you reproduce with last 2.9.0 ?

Gilles Caulier
Comment 2 Roger Larsson 2012-09-08 18:00:31 UTC
/dev/sdb3 /home ext4 rw,relatime,data=ordered 0 0

Got an idea... is the file created in another directory, like /tmp, and then moved?
If so it could take the default permissions from the first directory...

I have not tried with 2.9.0.
Comment 3 caulier.gilles 2012-09-08 18:10:21 UTC
yes. We use KDE tmp dir to host temp filed from camera before to operate transformationd. After that it copied to target.

Note : i use ext4 here too, and i never seen this problem...

Gilles Caulier
Comment 4 Roger Larsson 2012-09-08 18:33:50 UTC
drwxrwsr-x 2 roger larsson 4096  8 sep 15.45 /archieve/dir/

touch on a file on /tmp gives
-rw-r--r-- 1 roger users 0  8 sep 20.28 /tmp/roger/permission.tst

Note: different groups, sticky group in the picture archieve...

This is how the resulting files look like, reduced access rights ONLY on portrait photos... I have done NO manual operation...

-rw-r--r-- 1 roger larsson 2975983  2 sep 10.07 RLH_3866.JPG
-rw-r--r-- 1 roger larsson 3023826  2 sep 10.07 RLH_3867.JPG
-rw-r--r-- 1 roger larsson 2200697  2 sep 09.51 RLH_3867_v1.JPG
-rw-r--r-- 1 roger larsson 3417982  2 sep 19.30 RLH_3868.JPG
-rw------- 1 roger larsson 2637758  2 sep 19.31 RLH_3869.JPG
-rw------- 1 roger larsson 2720621  2 sep 19.31 RLH_3870.JPG
-rw------- 1 roger larsson 2534564  2 sep 19.31 RLH_3871.JPG
-rw------- 1 roger larsson 2474691  2 sep 19.32 RLH_3872.JPG
-rw------- 1 roger larsson 2640753  2 sep 19.32 RLH_3873.JPG
-rw------- 1 roger larsson 2658504  2 sep 19.32 RLH_3874.JPG
-rw------- 1 roger larsson 3685471  2 sep 19.33 RLH_3875.JPG
-rw------- 1 roger larsson 5232189  7 sep 15.41 RLH_3876.JPG
-rw------- 1 roger larsson 4847213  7 sep 15.41 RLH_3877.JPG
-rw-r--r-- 1 roger larsson 4148222  7 sep 15.42 RLH_3878.JPG
-rw------- 1 roger larsson 4844987  7 sep 15.42 RLH_3879.JPG
-rw-r--r-- 1 roger larsson 4418342  7 sep 15.47 RLH_3880.JPG
-rw-r--r-- 1 roger larsson 4586290  7 sep 15.47 RLH_3881.JPG
-rw------- 1 roger larsson 4684302  7 sep 15.48 RLH_3882.JPG
-rw------- 1 roger larsson 4227049  7 sep 15.48 RLH_3883.JPG
-rw-r--r-- 1 roger larsson 4808604  7 sep 15.52 RLH_3884.JPG
-rw-r--r-- 1 roger larsson 4800182  7 sep 15.53 RLH_3885.JPG
-rw-r--r-- 1 roger larsson 4810012  7 sep 15.53 RLH_3886.JPG
-rw-r--r-- 1 roger larsson 5050771  7 sep 15.56 RLH_3887.JPG
-rw-r--r-- 1 roger larsson 5271646  7 sep 15.56 RLH_3888.JPG
-rw-r--r-- 1 roger larsson 5088588  7 sep 15.57 RLH_3889.JPG
-rw------- 1 roger larsson 4849293  7 sep 15.58 RLH_3890.JPG
-rw------- 1 roger larsson 5160190  7 sep 15.59 RLH_3891.JPG
-rw-r--r-- 1 roger larsson 3682168  7 sep 16.00 RLH_3892.JPG
-rw------- 1 roger larsson 4095005  7 sep 18.01 RLH_3893.JPG
Comment 5 Marcel Wiesweg 2012-09-08 18:49:58 UTC
The JPEG rotator saves the temp file next to the original and then uses atomic rename (which wouldn't be possible if tmp was on a different partition, which is not unlikely).
Temp file creation is based on QTempFile. We dont explicitly copy file permission in the code at the moment. Maybe we need to do that - but why did noone ever notice this problem?
Comment 6 Roger Larsson 2012-09-08 19:06:16 UTC
Next to the original. In the destination/archieve directory?

Most people work with only their own files - in reality a single user system.
It works for the owner of the file...
It also works if several users share the same account...

This problem is new (2.6.0), have not seen it before...
Comment 7 Teemu Rytilahti 2013-12-02 16:52:17 UTC
Does this problem still exist in recent Digikam versions?
Comment 8 Roger Larsson 2013-12-02 19:58:27 UTC
No, it is gone!