Bug 119366 - problems with changing permissions in the mask entry
Summary: problems with changing permissions in the mask entry
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: kfile (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Till Adam
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-02 10:42 UTC by urwald
Modified: 2006-01-16 20:34 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description urwald 2006-01-02 10:42:12 UTC
Version:            (using KDE KDE 3.5.0)
Installed from:    SuSE RPMs
OS:                Linux

I have a file with the permissions rwx------. The mask is --- and there exists a named user "cdrom" with rwx (effective ---).

When I change the mask in konqueror to r-x, close the acl dialog and the normal properties dialog and reopen these dialog, then the mask is rxw!

When I change the mask then another time to r-x, close the acl dialog and the normal properties dialog and reopen these dialog, then the mask is ---!

By the way: from time to time the acl dialog is crashing with this file! But I didn't found a possibility to reproduce this.
Comment 1 Thiago Macieira 2006-01-02 12:52:18 UTC
ACL dialog issue.
Comment 2 Till Adam 2006-01-09 13:44:11 UTC
Hello Tim. Can you please try doing the same manipulations in a terminal using the getfacl and setfacl command line tools? I'd be interested to see if those mask changes happen due to policy enforcement of some kind in libacl. The crash, btw, is believed fixed, in the meantime. Not sure if SuSE has it in their updates yet.
Comment 3 urwald 2006-01-09 21:44:29 UTC
timi@linux:~> getfacl ./mask.xcf
# file: mask.xcf
# owner: timi
# group: users
user::rwx
user:test:rwx                   #effective:---
group::---
mask::---
other::---

timi@linux:~> setfacl -m mask:r-x ./mask.xcf
timi@linux:~> getfacl ./mask.xcf
# file: mask.xcf
# owner: timi
# group: users
user::rwx
user:test:rwx                   #effective:r-x
group::---
mask::r-x
other::---

timi@linux:~>

#################################################

Here, I've reset the mask to rwx using konqueror.

#################################################

timi@linux:~> getfacl ./mask.xcf
# file: mask.xcf
# owner: timi
# group: users
user::rwx
user:test:rwx
group::---
mask::rwx
other::---

timi@linux:~> setfacl -m mask:r-x ./mask.xcf
timi@linux:~> getfacl ./mask.xcf
# file: mask.xcf
# owner: timi
# group: users
user::rwx
user:test:rwx                   #effective:r-x
group::---
mask::r-x
other::---

timi@linux:~>

#################################################

So the described operations work fine with setfacl. Now mask is r-x and this is also showed in konqueror. When I take now off the x (change to r--), then konqueror sets rwx!

#################################################

timi@linux:~> getfacl ./mask.xcf
# file: mask.xcf
# owner: timi
# group: users
user::rwx
user:test:rwx
group::---
mask::rwx
other::---

timi@linux:~>
Comment 4 urwald 2006-01-10 08:44:55 UTC
Well, I'm not a developer, but is it possible that this bug has something to do with the fact, that setfacl recalculates the mask entry by default when mask isn't explicitly given? setfacl set the mask to the union of all entries affected by the mask, so when konqueror writes the acl in 2 steps, first changing the mask entry and second rewriting the named user "test", that would mean that mask takes over the permissions of "test".
Don't know if this helps you...
Comment 5 Till Adam 2006-01-16 20:34:52 UTC
Hm, commit hook doesn't seem to be working, so I'm closing manually:

SVN commit 498977 by tilladam:

Don't re-calculate the maximum possible mask based on named groups and
users when there is already a specific one set. Add test case for adding 
a mask to an ACL which previously didn't have one. Thanks for the nice
test case, Tim.