Bug 1143965

Summary: do not change group/onwer at save existing file
Product: [Fedora] Fedora Reporter: Harald Reindl <h.reindl>
Component: kateAssignee: Than Ngo <than>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: jreznik, kevin, ltinkl, rdieter, rnovacek, than
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-29 12:03:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Harald Reindl 2014-09-18 10:44:13 UTC
* the file below had onwer and group root
* the folder is mounted with sshfs
* i edit this file and press save
* why in the world does kate chnage the onwer?

-rw-r--r-- 1  500  501 2,4K 2014-09-18 12:42 whitelist_helo_by_ptr.cf

Comment 1 Rex Dieter 2014-09-18 13:29:04 UTC
What were the ownership/permissions of the original file?

Comment 2 Harald Reindl 2014-09-18 14:24:18 UTC
root:root

the machine is mounted for several reasons like below
500 = uid = harry
501 = gid = verwaltung

the main question is why do kate try to change the owner/group at all?
in case of open a exsiting file i don't expect das perms/owner/group are changed in any way by save it only because if have the permissions to do so - this can introduce all sort of troubles if you work on a server with restricted permissions of specific files for security - the case above only don't harm because of chmod 0644, with chmod 0640 postfix would no longer be able to read the file

sshfs#root@hostname:/ /mnt/hostname fuse noauto,user,rw,noexec,nosuid,nodev,uid=harry,gid=verwaltung

Comment 3 Harald Reindl 2014-09-18 14:25:58 UTC
BTW: as far as i remember Konqueror had exactly the same problem in earlier KDE4 days by copy a file over a existing one with kio-sftp slave leading to break complete websites by replace a config-include

Comment 4 Rex Dieter 2014-09-18 14:36:01 UTC
If the permissions were 644 and owned by root, then the only way to save the file would be to replace it (assuming your user had write permission to the parent directory).

Comment 5 Harald Reindl 2014-09-18 17:13:55 UTC
Hum? from the view of the server *i am root* and i *have* write permissions
just write into that file and don't touch anything

opening the *identical file* in the identical environment with Eclipse and all is fine - only KDE components tend to make troubles on network FS

just write *into* that file instead play around with try to replace it atomic
this behavior has a lot of bad impact round the complete stack (Knoqeuror and so on)

* the parent directory is read-only
* you have read permissions to it
* you have the permissions to edit a single file
* it fails by try to generate a temporary file and renmae it finally

the scenario is *completly legit* to prevent somebody just rename a read-only file, create a new one and give it the filename of the previously renamed read-only - not only once i had users exceed there intented permissions that way

example: the user has write permissions to a config file but not to the script files around

forget the atomic replacement - it defeats to chose wise security settings without making users work impossible

Comment 6 Harald Reindl 2015-02-18 11:55:58 UTC
again: i mount the sshfs as root, so no you can just save it as usual, other software like eclipse can without change woner/group to th numeric ones of the client

it is really annyoing :-(

Comment 7 Harald Reindl 2015-02-18 11:59:12 UTC
and it is the Apple Inc. way

why not just try to save as usual instead magically guess what is possible and only if that fails fall back to replaced it? 

that would also solve *a ton* of problems where you have write permissions to a specific file *but* not the parent folder 

the reason for such a setup is a design mistake in unix: forbid rename files you don't have write permissions to and palce a new ones is not possible in any other way except using ACL's

Comment 8 Fedora End Of Life 2015-05-29 12:54:52 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 Fedora End Of Life 2015-06-29 22:36:20 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 10 Harald Reindl 2017-01-26 19:30:09 UTC
GOD DAMNED - each time you edit a file with kate things breaking because changed owner/groups - the devlopers should eat their own dogfood and work on machines used my multiple users each of them in more that one group

Comment 11 Harald Reindl 2017-01-26 19:31:09 UTC
and yeah that happens even for files on my local machine when they have chmod 644 and group 'apahe' so that the webserver can read them when after save with kate the group is no longer apache

Comment 12 Fedora End Of Life 2017-07-25 18:42:35 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 13 Harald Reindl 2017-07-25 18:44:33 UTC
how many years does it take to simply act like eclipse here instead ruin permissions on such a basic task like open a file, chnage some chars and press save?

Comment 14 Fedora End Of Life 2017-11-16 19:40:50 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 15 Fedora End Of Life 2017-12-12 10:15:12 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 16 Fedora End Of Life 2018-05-03 08:53:46 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 17 Fedora End Of Life 2018-05-29 12:03:11 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
is no longer maintained, which means that it will not receive any
further security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.