[frameworks-kio] [Bug 103331] Group should be preserved when making backup
https://bugs.kde.org/show_bug.cgi?id=103331 --- Comment #23 from Nate Graham --- Anything more to do here, or is this fully fixed now? -- You are receiving this mail because: You are watching all bug changes.
[frameworks-kio] [Bug 103331] Group should be preserved when making backup
https://bugs.kde.org/show_bug.cgi?id=103331 --- Comment #22 from Ahmad Samir --- Git commit de7aff60e81b05239fd3d6c17895c48a985dd27a by Ahmad Samir. Committed on 19/09/2021 at 10:06. Pushed by ahmadsamir into branch 'master'. Fix permissions when copying files This reverts commit 7863f595991c5, I was wrong :) Reading the code some more (in copyjob, file_copy and file_unix), the permissions arg is '-1' when we shouldn't touch the dest permissions at all, i.e. leave them as the system default permissions for newly created files (umask ...etc). The scenarios are: - calling KIO::copy() A to B, permissions are preserved by default, i.e. the job copies A's permissions to the permissions arg when it calls file_copy - calling KIO::copy() A to B, and calling setDefaultPermissions(true), the job sets the permissions arg to '-1' when it calls file_copy - calling KIO::file_copy() directly, the you have full control, if you want to preserve the permissions use A's permissions as the permissions arg, otherwise use '-1' to use the system default permissions ACL attributes are handled implicitly at the moment, which isn't ideal but can be improved later on. Related: bug 404777 FIXED-IN: 5.87 M +4-6src/core/filecopyjob.h M +15 -22 src/ioslaves/file/file_unix.cpp https://invent.kde.org/frameworks/kio/commit/de7aff60e81b05239fd3d6c17895c48a985dd27a -- You are receiving this mail because: You are watching all bug changes.
[frameworks-kio] [Bug 103331] Group should be preserved when making backup
https://bugs.kde.org/show_bug.cgi?id=103331 --- Comment #21 from David Faure --- Git commit ff4bb61b2f5492f1942c1f11fe4c8b9a7eb654ea by David Faure, on behalf of Ahmad Samir. Committed on 22/08/2021 at 08:28. Pushed by dfaure into branch 'master'. file_unix: minor cleanup Separate ::chmod() from acl_set_file() call, more readable that way. If the permissions are -1, that means preserve the permissions/attributes of the source file, this matches what the code is/was doing and the docs. Maybe we should add a couple more setters for the job, e.g. setPermissions(), setAcl(), then users can fine-tune the permissions of the dest, preserve, don't set, leave as default M +9-5src/ioslaves/file/file_unix.cpp https://invent.kde.org/frameworks/kio/commit/ff4bb61b2f5492f1942c1f11fe4c8b9a7eb654ea -- You are receiving this mail because: You are watching all bug changes.
[frameworks-kio] [Bug 103331] Group should be preserved when making backup
https://bugs.kde.org/show_bug.cgi?id=103331 Nate Grahamchanged: What|Removed |Added CC||kdelibs-b...@kde.org, ||pointedst...@zoho.com Component|general |general Product|kio |frameworks-kio -- You are receiving this mail because: You are watching all bug changes.
[kio] [Bug 103331] Group should be preserved when making backup
https://bugs.kde.org/show_bug.cgi?id=103331 --- Comment #20 from Martin Koller--- It seems there is disagreement between people to how this actually should work. Since I have no experience with ACL, I did not look into this further. -- You are receiving this mail because: You are watching all bug changes.
[kio] [Bug 103331] Group should be preserved when making backup
https://bugs.kde.org/show_bug.cgi?id=103331 --- Comment #19 from Christoph Feck--- Martin, any update? -- You are receiving this mail because: You are watching all bug changes.
[kio] [Bug 103331] Group should be preserved when making backup
https://bugs.kde.org/show_bug.cgi?id=103331 --- Comment #18 from bjoe...@arcor.de --- (In reply to Maximiliano Curia from comment #16) > This patch breaks the setgid directories and default acl semantics. It might > be better to avoid setting the group if the dest dir is setgid, and avoid > setting the file permissions if the destdir has a default acl value. I agree in case of normal copy operations. But in case of Kate editor's backups (initial subject of this report) it may not be wise to ignore to set permissions or groups in special situations. Both can again result in situations, where some users have more permissions on the backup file than on the original. A flag like "--preserve" for the "cp" command can be used to make preserving of permissions and groups optional. I can recommend the file operations code of the VIM editor. It contains code for handling backups and all kinds of ACLs: https://github.com/vim/vim/blob/master/src/fileio.c https://github.com/vim/vim/blob/master/src/os_unix.c -- You are receiving this mail because: You are watching all bug changes.
[kio] [Bug 103331] Group should be preserved when making backup
https://bugs.kde.org/show_bug.cgi?id=103331 David Faurechanged: What|Removed |Added Assignee|fa...@kde.org |kol...@aon.at Status|RESOLVED|REOPENED Resolution|FIXED |--- --- Comment #17 from David Faure --- Martin Koller, can you take a look at the regression due to your patch, as per the last comment? -- You are receiving this mail because: You are watching all bug changes.
[kio] [Bug 103331] Group should be preserved when making backup
https://bugs.kde.org/show_bug.cgi?id=103331 Maximiliano Curiachanged: What|Removed |Added CC||m...@debian.org --- Comment #16 from Maximiliano Curia --- (In reply to Martin Koller from comment #15) > Git commit d252f7958633f3374e77e1cc52f11c534ca55219 by Martin Koller. > Committed on 22/01/2017 at 19:49. > Pushed by mkoller into branch 'master'. > > preserve group/owner on file copy > REVIEW: 129864 > > M +28 -12 src/ioslaves/file/file_unix.cpp > > https://commits.kde.org/kio/d252f7958633f3374e77e1cc52f11c534ca55219 This patch breaks the setgid directories and default acl semantics. It might be better to avoid setting the group if the dest dir is setgid, and avoid setting the file permissions if the destdir has a default acl value. Happy hacking, -- You are receiving this mail because: You are watching all bug changes.
[kio] [Bug 103331] Group should be preserved when making backup
https://bugs.kde.org/show_bug.cgi?id=103331 Martin Kollerchanged: What|Removed |Added Status|ASSIGNED|RESOLVED Latest Commit||https://commits.kde.org/kio ||/d252f7958633f3374e77e1cc52 ||f11c534ca55219 Resolution|--- |FIXED --- Comment #15 from Martin Koller --- Git commit d252f7958633f3374e77e1cc52f11c534ca55219 by Martin Koller. Committed on 22/01/2017 at 19:49. Pushed by mkoller into branch 'master'. preserve group/owner on file copy REVIEW: 129864 M +28 -12 src/ioslaves/file/file_unix.cpp https://commits.kde.org/kio/d252f7958633f3374e77e1cc52f11c534ca55219 -- You are receiving this mail because: You are watching all bug changes.