Bug 379818 - Kate, Kwrite seems to not apply acls rules
Summary: Kate, Kwrite seems to not apply acls rules
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (other bugs)
Version First Reported In: 16.08
Platform: openSUSE Linux
: NOR grave
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-14 15:10 UTC by jcdole
Modified: 2018-08-24 18:33 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.50
Sentry Crash Report:


Attachments
screenshots of acl command and other. (1.39 KB, text/x-log)
2017-05-14 15:10 UTC, jcdole
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jcdole 2017-05-14 15:10:11 UTC
Created attachment 105529 [details]
screenshots of acl command and other.

Initial conditions :
- OS : Leap 42.2
- Kernel : 4.4.62-18.6-default - x86_64
- File system : ext4 and xfs
UUID=857c3295-5944-4593-82e2-bb90dede4312 / ext4  noatime,acl,user_xattr   1 1
UUID=6173a3df-4407-427c-b01a-c2d664471fc8 /data3_dwnld_pub  xfs  defaults  1 2
- ACL : 2.2.52-8.55
- KDE : Frameworks 5.26.0 - Qt 5.6.1 (built against 5.6.1)
- KATE : Version 16.08.2 

Goal : In folders defined as "PUBLIC" for users in group "publicuser', any users can do anythings but cannot delete objects they do not own.

1st Step : Creation of initial group, user and folders
Create group publicuser
Create user publicuser (no login user), user_test1, user_test2
Add publicuser, user_test1, user_test2 to group publicuser
Create a new folder : 
   mkdir -p /d_pub_folder
   chown   publicuser:publicuser /d_pub_folder 
Create sub-folder for each regular user
   mkdir -p /d_pub_folder/user_test1
   chown user_test1:publicuser /d_pub_folder/user_test1   
   mkdir -p /d_pub_folder/user_test2
   chown user_test2:publicuser /d_pub_folder/user_test2
Set properties on new folders
   chmod -R 770 /d_pub_folder
   chmod -R g+s /d_pub_folder
   chmod -R +t  /d_pub_folder
Set ACL on new folders
   #set user to rwx, group to ---, group publicuser to rwx,other to ---
   setfacl -R -m u::rwx,g::---,g:publicuser:rwx,o:---  /d_pub_folder
   #set default : user to rwx, group to ---, group publicuser to rwx,other to ---
   setfacl -R -d -m u::rwx,g::---,g:publicuser:rwx,o:---  /d_pub_folder

2nd Step : Files creation
Create new files owned by each user in their respective folder  
   su to user_test1
   echo "Create by user_test1 in user_test1's folder" > /d_pub_folder/user_test1/testfile_1.txt
   su to user_test2
   echo "Create by user_test2 in user_test2's folder" > /d_pub_folder/user_test2/testfile_2.txt
Create new files own by user_test2 in user_test2's folder  
   echo "Create by user_test2 in user_test1's folder" > /d_pub_folder/user_test1/testfile_4.txt

3rd Step : ACL Check from a "public" folder /d_pub_folder/....
1°) OK : any user can create a file in it's own folder
2°) OK : any user can create a file in folder owned by others
3°) OK : any user can modify a file they owned in folder owned by others
4°) OK : any user cannot delete a file they do not owned any where
5°) OK : any user can modify a file they do not owned using vi in a terminal emulator (Konsole)

What does not work
USING KATE or KWRITE
6°) FAILED : any user cannot modify a file they do not owned. Write is denied

Any help is welcome.
Comment 1 jcdole 2017-06-07 08:18:33 UTC
Hello.
Please, can you take this into account

Opensuse has confirmed this problem.
https://bugzilla.opensuse.org/show_bug.cgi?id=1038435

Thank you.
Comment 2 jcdole 2017-07-16 16:14:24 UTC
May have I your attention please.
Comment 3 jcdole 2017-09-21 20:38:03 UTC
May have I your attention please.
Comment 4 Christoph Cullmann 2018-08-18 09:13:45 UTC
Remove QSaveFile in favor of plain old file saving

Summary: Rationale: for many use cases that e.g. have acls, complex other extended attributes, static links e.g. the rename() doesnt do the trick it should other ways would be start to add workarounds to all cases, which is hard, e.g. if that is something shared via SMB...

Test Plan: make && make test

Reviewers: dhaumann, dfaure

Reviewed By: dhaumann, dfaure

Subscribers: dfaure, kwrite-devel, kde-frameworks-devel

Tags: #kate, #frameworks

Differential Revision: https://phabricator.kde.org/D14890
Comment 5 jcdole 2018-08-24 15:24:21 UTC
What should I must understand ?
Can we expect using acl on file modified with kate or kwrite
Comment 6 Dominik Haumann 2018-08-24 16:49:14 UTC
Yes, it will work with KDE Frameworks 5.50.
Comment 7 jcdole 2018-08-24 18:33:21 UTC
Thank you very much