Bug 149148

Summary: Ignores the setuid bit
Product: [Applications] gwenview Reporter: rafaeldigital
Component: generalAssignee: Gwenview Bugs <gwenview-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: adaptee
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description rafaeldigital 2007-08-23 22:33:04 UTC
Version:           gwenview 1.4.1 (using KDE KDE 3.5.6)
Installed from:    Ubuntu Packages
OS:                Linux

I was using the Gwenview 1.4.1, on Linux Ubuntu 7.04, KDE 3.5.6, and I verified a bug:
When I go to save an image in a directory which have the permission "setuid bit" the program ignores the "setuid bit".

Example:
There is this directory "/home/secom/materias/" look it listed:
ls -ld /home/secom/materias/
drwxrws --- 7 root redacao 1096 2007-08-23 15:59 /home/secom/materias/
And there is a user:
id jack
uid=1014(jack) gid=498(fotografia) grupos=498(fotografia),6(disk),24(cdrom),25(floppy),100(users),117(fuse)
In accordance with the permission of the directory, everting that jack saves in this directory will have the permission:
-rw-rw----  1 jack     redacao 1302528 2007-08-21 11:53 Reciclagem.odt
Look: the group of the archive is "redacao" due to permission of the folder to have the "setuid bit".
The problem is: When I go to save an image with the Gwenview in these directory (that have the permission "setuid bit") the program ignores the "setuid bit", the permission stay:
-rw-rw----  1 jack     fotografia    68407 2007-08-23 15:37 picture.jpg
It should be:
-rw-rw----  1 jack     redacao    68407 2007-08-23 15:37 picture.jpg

Could you verify this problem? You can try with a folder:
mkdir folder
chmod 2777 folder/
ls -ld folder/
drwxrws--- 2 root root 48 2007-08-23 16:41 folder/
So, with an other user try to save something in this folder with and without the Gwenview.
Comment 1 Jekyll Wu 2012-01-03 12:54:26 UTC
I know this is a quite old report, but I failed to reproduce the reported problem using KDE SC 4.8 RC1. 

Feel free to reopen this report if the problem still happens in recent versions of KDE SC.