Bug 225658 - recursive setting of ownership fails if directory already matches the ownership requested
Summary: recursive setting of ownership fails if directory already matches the ownersh...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: Properties dialog (show other bugs)
Version: 5.47.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
: 232877 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-02-05 20:26 UTC by Christian Trippe
Modified: 2021-07-26 21:09 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.85


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Trippe 2010-02-05 20:26:08 UTC
Version:           1.4 (using 4.3.98 (KDE 4.3.98 (KDE 4.4 RC3)) "release 216", KDE:KDE4:Factory:Desktop / openSUSE_11.2)
Compiler:          gcc
OS:                Linux (i686) release 2.6.31.8-0.1-default

Using Konqueror or Dolphin to recursively set the ownership of files in a
directory fails if the directory already has the ownership requested. E.g. if I
have files in my ${HOME}/Documents directory that have a group ownership of
something other than users, using Konqueror or Dolphin to set their ownership
to users fails if you use the permissions tab of the properties to set them.
Enabling the "Apply recursively" checkbox makes no difference as there appears
to be a check to see if the directory already matches the ownership and no
ownership changes are made if it does.

Interestingly, I also checked to see if file permissions were also affected by
this check and they are not. When the "Apply recursively" checkbox is checked,
there is a recursive scan taking place and the file permissions appear to be
correctly set.

Reproducible: Always

Steps to Reproduce:
1. Change group ownership of a file inside a directory, for instance to group
video.
2. Open either Konqueror or Dolphin so the directory is visible
3. Right-click on the directory and select Properties from the pop-up menu
4. Change to the permissions tab and check the "Apply recursively" checkbox
5. Click on "Okay"
Actual Results:  
If the group ownership of the directory isn't changed, any files with a
differing group ownership are left with their original group ownership.


This bug was originally reported downstream at https://bugzilla.novell.com/show_bug.cgi?id=542596
Comment 1 Ahmad Samir 2021-07-16 23:07:38 UTC
*** Bug 232877 has been marked as a duplicate of this bug. ***
Comment 2 Ahmad Samir 2021-07-26 21:09:45 UTC
Git commit 42b5166314dcbc3018f56fd6450dbcd54b6642fc by Ahmad Samir.
Committed on 26/07/2021 at 21:09.
Pushed by ahmadsamir into branch 'master'.

KPropertiesDialog: fix applying permissions recursively

If "apply recursively" is enabled for dirA, we need to apply the owner/group
permissions to the contents of that dir, even if the owner/group weren't
changed in the dialog, since the items under that dir could have different
permissions.
FIXED-IN: 5.85

M  +9    -6    src/widgets/kpropertiesdialog.cpp

https://invent.kde.org/frameworks/kio/commit/42b5166314dcbc3018f56fd6450dbcd54b6642fc