[Digikam-devel] [Bug 145252] Umask settings used for album directory, not for image files

Arnd Baecker arnd.baecker at web.de
Tue Oct 16 16:35:34 BST 2007

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

------- Additional Comments From arnd.baecker web de  2007-10-16 17:35 -------
I had a look at the rights problem concerning
the thumbnails first:
Thumbnail generation is done in 
where one finds the construct
  KTempFile temp(thumbPath + "-digikam-", ".png");
into which then the thumbnail is written by
  img.save(temp.name(), "PNG", 0);
After this the file is renamed.
According to the documentation of KTempFile the default mode is 0600,
i.e. -rw------- 

So if there is a way to create the temporary
file with the current umask, all should be

Note that in digikam/kioslave/digikamalbums.cpp 
one finds this approach:
    if ( ::mkdir( _path.data(), 0777 /*umask will be applied*/ ) != 0 )

So to me it seems that 
  // Using 0777 as mode means that the umask will be applied.
  KTempFile temp(thumbPath + "-digikam-", ".png", 0777 );
should solve this problem.

Does this sound reasonable, or are there any security (or other
problems?) with this approach?

I suspect that the other rights problems are similar ...

Best, Arnd

More information about the Digikam-devel mailing list