Hide Forgot
Description of problem: If I change the context of a file (using `chcon -t [context] filename`) and then edit the file with gedit, the file changes back to it's original file context each save. Version-Release number of selected component (if applicable): gedit-3.18.3-1.fc23.x86_64 How reproducible: Very Steps to Reproduce: 1. change the context of a file using chcon -t new_context filename In my case this file is a cgi file in a folder in /var/www/html/x/ ls -lZ shows drwxr-xr-x. 6 rodd rodd unconfined_u:object_r:httpd_sys_content_t:s0 4096 Apr 8 20:01 . -rwxr-xr-x. 1 rodd rodd unconfined_u:object_r:httpd_sys_script_exec_t:s0 9506 Jun 5 2015 rep_period.cgi I've used chcon -t httpd_sys_script_exec_t rep_setup.cgi to change the context so that the cgi file can run. 2. Edit the file using vi. 3. Check the context of the file using ls -lZ. It should be the new context. 4. Edit the file using gedit (in effect, open it and then press CTRL-S) and save the file. 5. Check the context again with ls -lZ Actual results: The context of the file has changed back to the default for the directory, in my case 'httpd_sys_content_t'. As a result the file will no longer work properly until the context required is restored. Expected results: The file context should remain the same, and the file should continue to work as expected. Additional Information:
This message is a reminder that Fedora 23 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 23. 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 '23'. 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 23 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.
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 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.
This is still a problem in Fedora 25, so I'm reopening this. I can still edit the file in vi and it keeps the context, edit it in gedit an it clobbers the context. It's easy enough to turn of enforcing, but it kind of goes against the principals of things just working right.
This is still an issue in gedit-3.22 gedit should respect selinux contexts, instead of resetting them on change.
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.
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.