1

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?

5
  • is your user allowed to execute sudo nano on the server?
    – Alex
    Jun 21, 2018 at 15:19
  • @Alex yes. Updating question to be a bit more clear. Jun 21, 2018 at 15:20
  • Where is the file located? Is it on a local filesystem or maybe on nfs/fuse fs?
    – Zoredache
    Jun 21, 2018 at 15:56
  • @Zoredache it's on EC2 - local on the EBS volume Jun 21, 2018 at 16:24
  • Does it work if you rename the file or use a different editor? I'm wondering if this has something to do with nano trying to create a temporary file or loading different profile settings. Jun 23, 2018 at 2:36

0

You must log in to answer this question.

Browse other questions tagged .