[digikam] [Bug 327254] New: ACL default:mask ignored / mask changed for (image editor | batch queue manager)

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 327254] New: ACL default:mask ignored / mask changed for (image editor | batch queue manager)

Thomas Bettler-2
https://bugs.kde.org/show_bug.cgi?id=327254

            Bug ID: 327254
           Summary: ACL default:mask ignored / mask changed for (image
                    editor | batch queue manager)
    Classification: Unclassified
           Product: digikam
           Version: 3.5.0
          Platform: Gentoo Packages
               URL: https://bugs.kde.org/show_bug.cgi?id=308373
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: Image Editor
          Assignee: [hidden email]
          Reporter: [hidden email]

While [batch] editing images, the new saved images get their permissions
changed in a undesired way...
The destination folder has the following ACL settings:
bash$ getfacl .
# file: .
# owner: t
# group: users
user::rwx
user:r:rwx
user:t:rwx
group::---
mask::rwx
other::---
default:user::rwx
default:user:r:rwx
default:user:t:rwx
default:group::---
default:mask::rwx
default:other::---

Reproducible: Always

Steps to Reproduce:
1. edit or batch edit images with digikam
Actual Results:  
Unexpectingly and unfortunately the edited image has mask:: changed to ---

Expected Results:  
Expected behaviour: It should be mask::rw- instead.

Found to happen in:
./utilities/imageeditor/editor/editorwindow.cpp:  
EditorWindow::setupTempSaveFile(const KUrl& url)
./utilities/queuemanager/manager/batchtool.cpp:  
BatchTool::setOutputUrlFromInputUrl()


Please double check if there are more cases where tempfiles are created and
wrong permissions applied. Eventually there should be considered a global
solution for this situation.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 327254] ACL default:mask ignored / mask changed for (image editor | batch queue manager)

Gilles Caulier-4
https://bugs.kde.org/show_bug.cgi?id=327254

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #1 from Gilles Caulier <[hidden email]> ---
Thomas,

Problem still valid using last digiKam 4.2.0 ?

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 327254] ACL default:mask ignored / mask changed for (image editor | batch queue manager)

Thomas Bettler-2
In reply to this post by Thomas Bettler-2
https://bugs.kde.org/show_bug.cgi?id=327254

--- Comment #2 from Thomas Bettler <[hidden email]> ---
Gilles,

1) For batch editing behaviour is still unexpected as described in bug report
above.

2) For versioned image editing behaviour has changed and leads to other
unexpected results, thus still needs to be fixed:

Directory defaults as mentioned above in bug report above.

File orig has rwx for several users, while group:--- / others:--- / mask:rw-
# file: orig.jpg
# owner:t
#group:users
user::rw-
user:r:rwx          #effective:rw-
user:t:rwx          #effective:rw-
group::---          
mask::rw-
other::---

Image editing leads to unexpected results for others:r-- / mask:r--
# file: edited.jpg
# owner: t
# group: users
user::rw-
user:r:rwx           #effective:r--
user:t:rwx           #effective:r--
group::---
mask::r--
other::r--

Expected results would be: New versioned file gets the same ACL as origin file

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 327254] ACL default:mask ignored / mask changed for (image editor | batch queue manager)

Gilles Caulier-4
In reply to this post by Thomas Bettler-2
https://bugs.kde.org/show_bug.cgi?id=327254

--- Comment #3 from Gilles Caulier <[hidden email]> ---
Thomas,

For Image editor, ACL are managed through std::umask() in this method :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/utilities/imageeditor/editor/editorwindow.cpp#L2552

What's missing here ? Documentation about umask() function can be found here :

http://man7.org/linux/man-pages/man2/umask.2.html

In BQM, there is no similar code. So, right this is missing.

It miss also code certainly in ImportUI, when files are copy from camera to
computer, but i'm not sure.

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 327254] ACL default:mask ignored / mask changed for (image editor | batch queue manager)

Gilles Caulier-4
In reply to this post by Thomas Bettler-2
https://bugs.kde.org/show_bug.cgi?id=327254

--- Comment #4 from Gilles Caulier <[hidden email]> ---
For BQM, relevant code written in ImageEditor must be called somewhere here :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/utilities/queuemanager/manager/task.cpp#L233

... to restore file attribute from original to target file.

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 327254] ACL default:mask ignored / mask changed for (image editor | batch queue manager)

Gilles Caulier-4
In reply to this post by Thomas Bettler-2
https://bugs.kde.org/show_bug.cgi?id=327254

--- Comment #5 from Gilles Caulier <[hidden email]> ---
Thomas,

I tested Image Editor ACL management on my computer where i use ext4. I open a
JPEG file and just perform File Save As :

[gilles@localhost TESTS]$ ls -al *.jpg
-rw-rw-r-- 1 gilles gilles 24141637 sept.  4 13:59 2.jpg
-rw-rw-r-- 1 gilles gilles 16004774 sept.  3 17:30 1.jpg
[gilles@localhost TESTS]$ getfacl -e 1.jpg
# file: 1.jpg
# owner: gilles
# group: gilles
user::rw-
group::rw-
other::r--

[gilles@localhost TESTS]$ getfacl -e 2.jpg
# file: 2.jpg
# owner: gilles
# group: gilles
user::rw-
group::rw-
other::r--

1.jpg is original, and 2.jpg the new file created. There is no difference.

I miss something ?

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 327254] ACL default:mask ignored / mask changed for (image editor | batch queue manager)

Gilles Caulier-4
In reply to this post by Thomas Bettler-2
https://bugs.kde.org/show_bug.cgi?id=327254

--- Comment #6 from Gilles Caulier <[hidden email]> ---
Git commit 1d29b8828ffde096d7d288dd76714c2f8edf56b1 by Gilles Caulier.
Committed on 04/09/2014 at 12:59.
Pushed by cgilles into branch 'master'.

Factorize ACL method preservation from ImageEditor as a static and public
method
Use this method in BQM core when file are renamed.
Add documantation API

M  +10   -9    utilities/imageeditor/editor/editorwindow.cpp
M  +6    -1    utilities/imageeditor/editor/editorwindow.h
M  +7    -3    utilities/queuemanager/manager/task.cpp

http://commits.kde.org/digikam/1d29b8828ffde096d7d288dd76714c2f8edf56b1

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 327254] ACL default:mask ignored / mask changed for (image editor | batch queue manager)

Gilles Caulier-4
In reply to this post by Thomas Bettler-2
https://bugs.kde.org/show_bug.cgi?id=327254

--- Comment #7 from Gilles Caulier <[hidden email]> ---
Thomas,

With my last commit, BQM must have the same behavior than Image Editor now.

It still a problem with a restoration of all ACL properties. Right ?

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 327254] ACL default:mask ignored / mask changed for (image editor | batch queue manager)

Gilles Caulier-4
In reply to this post by Thomas Bettler-2
https://bugs.kde.org/show_bug.cgi?id=327254

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|3.5.0                       |4.2.0

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 327254] ACL default:mask ignored / mask changed for (image editor | batch queue manager)

Gilles Caulier-4
In reply to this post by Thomas Bettler-2
https://bugs.kde.org/show_bug.cgi?id=327254

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #8 from Gilles Caulier <[hidden email]> ---
Marcel,

Do you know what's missing to support fully ACL with code implemented now in
filemanagement.cpp, to be common between IE et BQM :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/utilities/imageeditor/core/filemanagement.cpp#L50

Gilles

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 327254] ACL default:mask ignored / mask changed for (image editor | batch queue manager)

Marcel Wiesweg
In reply to this post by Thomas Bettler-2
https://bugs.kde.org/show_bug.cgi?id=327254

--- Comment #9 from Marcel Wiesweg <[hidden email]> ---
Sorry, I do not have ACLs in use. I would hope the original poster of this bug
was available to carry out tests.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 327254] ACL default:mask ignored / mask changed for (image editor | batch queue manager)

bugzilla_noreply
In reply to this post by Thomas Bettler-2
https://bugs.kde.org/show_bug.cgi?id=327254

[hidden email] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #10 from [hidden email] ---
Maik,

Can you check if this file still valid with my last commit to factorize ACL
management code with Editor and BQM ?

Thanks in advance

Gilles

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 327254] ACL default mask is ignored or mask is changed for image editor and batch queue manager

bugzilla_noreply
In reply to this post by Thomas Bettler-2
https://bugs.kde.org/show_bug.cgi?id=327254

[hidden email] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ACL default:mask ignored /  |ACL default mask is ignored
                   |mask changed for (image     |or mask is changed for
                   |editor | batch queue        |image editor and batch
                   |manager)                    |queue manager

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 327254] ACL default mask is ignored or mask is changed for image editor and batch queue manager

bugzilla_noreply
In reply to this post by Thomas Bettler-2
https://bugs.kde.org/show_bug.cgi?id=327254

--- Comment #11 from [hidden email] ---
Can you reproduce the problem using digiKam Linux AppImage bundle ? The last
bundle is available at this url:

https://drive.google.com/drive/folders/0BzeiVr-byqt5Y0tIRWVWelRJenM

Gilles Caulier

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