I have a file on my Debian Stretch server that has the following security attribute:
-rw-r--r--, owned by root.
If I login as root directly (
su -), I can edit and save it. But if I try to do
sudo nano filename to open it with my admin user login, when I try to save it it gives me a permission denied error (and wants me to save it as a new file, instead of overwriting the current one).
Why would this be?