4
On a recently installed fedora 25 system (uname -a
→ Linux [host] 4.10.6-200.fc25.x86_64 #1 SMP Mon Mar 27 14:06:23 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
; using GNU Emacs 25.1.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.22.4) of 2016-12-15
according to emacs' own opening page), I am unable to overwrite in emacs the write protection of my own files.
This is the way it happens:
(a) I open my write-protected file (ls -l
→ -r--------. 1 me me 92996 Apr 10 20:44 myfile
),
(b) I disable write protection so I can edit (C-x C-q)
(c) I edit the file
(d) I want to save (C-x C-s)
(e) I am prompted "File myfile
is write-protected; try to save anyway? (yes or no) "
(f) I answer "yes", enter
(g) The message appears: "Opening output file: Permission denied, [full path]/myfile"
The directory is not write protected.
I have been able to edit and save my write-protected files forever on other systems (opensuse in the most recent years).
Disabling selinux mode on the system doesn't help. Please see more information in the comments.
I am unable to figure out what may be wrong.
What about SELinux labels? Are there any AVCs? – Jakuje – 2017-04-11T09:55:46.320
How can I check those? I am not sure what they are. However, note that the problem persists even when I disable selinux (after I set SELINUX=disabled in /etc/selinux/config and reboot afterwards). – Gyula – 2017-04-11T10:47:40.417
In my home directory (selinux disabled, see my previous comment) "ls -lZ" on the write protected "myfile" gives: [code] r--r--r-- 1 iam iam ? 12 Apr 12 13:14 ./myfile[code/]. On my home directory, the "ls -lZd ." command gives [code]drwxr-xr-x. 52 iam iam system_u:object_r:user_home_dir_t:s0 4096 Apr 12 13:15 ./[code/] – Gyula – 2017-04-12T19:29:32.577
In my home directory (selinux disabled, see my previous comment) "ls -lZ" on the write protected "myfile" gives:
r--r--r-- 1 iam iam ? 12 Apr 12 13:14 ./myfile
. On my home directory, the "ls -lZd ." command givesdrwxr-xr-x. 52 iam iam system_u:object_r:user_home_dir_t:s0 4096 Apr 12 13:15 ./
Theausearch -m avc
command seems to give no relevant information. Is this what you asked for? – Gyula – 2017-04-12T19:38:01.287Yes. It was that. But in case it does the same with disabled SELinux, it will not be the cause. – Jakuje – 2017-04-12T19:43:35.480
Thank you for your answer. Is there anything else I may try? – Gyula – 2017-04-12T19:46:05.050