1

For the life of me, I can't figure out how to change an interface config file in a VM: sudo vim /etc/sysconfig/network-scripts/enp0s3 won't write and sudo bash -c "echo 'dog' >> ./enp0s3" fails with "Permission Denied".

I've created a new file /etc/sysconfig/networks-scripts/enp0s8, and can change it fine. Both files are owned by root and show the same chmod values, rw-r--r--. They don't show a + when running ls which I think means there are no ACL permissions being applied.

They do have a different selinux user thingy when running ls -Z. I've set SELINUX=disabled in /etc/sysconfig/selinux and rebooted. getenforce returns disabled, but I still can't edit the file.

ADDED: I also don't see any handles on the file when I run lsof.

2
  • Could it be a filesystem corruption? – davidgo Apr 3 '18 at 20:12
  • I am able to edit it on two related vms, so it seems possible. I'm having trouble determining if there is corruption. My invocations of xfs_repair -n /dev/sda2 can't find the "superblock" and quit, so idk if that's relevant or if I'm pointing it at the wrong thing. However, my other vms (on which I can edit the file) also have that xfs_repair behavior. – xdhmoore Apr 3 '18 at 20:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.