Non-root user that (suddenly) has elevated privileges in a specific command (only). [Have I been hacked?]

Title. Long,short story: creating or editing files with nano as my non-root user gives (the file) elevated privileges, like I have ran it w/ sudo or as root. And the (only) “security hole” that I can think of is a nextdns docker container running as root. That aside, its very “overkill” security-wise (cap_drop=ALL,...

Kid_Thunder, (edited ) to linux in Non-root user that (suddenly) has elevated privileges in a specific command (only). [Have I been hacked?]

The directory you are creating your files in likely is set to immutable or append only.

lsattr -d /path/to/directory

if you see i or a, then that's the issue.

You can remove them with
sudo chattr -i /path/to/dir immutable
sudo chattr -a /path/to/dir append only

Same goes for files but if it happens to all files in a directory, then that is probably it.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #