I've got a file owned by root, which must get write access for normal users (particularly user pi):

pi@autoradio:/import/valen/autoradio $ ls -al autoradio.db
-rw-r--r-- 1 root root 2887050 Nov 12  2017 autoradio.db

pi@autoradio:/import/valen/autoradio $ getfacl autoradio.db
# file: autoradio.db
# owner: root
# group: root

But: When I switch to root mode with sudo (or even su), I can neither transfer the file to user pi nor make it world-writable because of missing priviliges:

pi@autoradio:/import/valen/autoradio $ sudo chmod a+w autoradio.db
chmod: changing permissions of 'autoradio.db': Operation not permitted

pi@autoradio:/import/valen/autoradio $ sudo chown pi autoradio.db
chown: changing ownership of 'autoradio.db': Operation not permitted

The file in question lies in an NFS share I mount as follows:

pi@autoradio:~ $ sudo mount -t nfs /import/valen

What's wrong here? How can root be excluded from operations on a file he owns himself? The O/S is the current version of Raspbian. Thank you.

  • 1
    Linux does not support ACLs over NFS. The outdated and withdrawn POSIX draft ACLs use a private Solaris extension with NFSv3 that is not implemented on Linux and for NFSv4, Linux would first need to implement ACE support...
    – schily
    Commented Dec 26, 2019 at 20:12

1 Answer 1


OK, I've got a solution now: I simply logged into the server containing the NFS share, and from there, I could access the file without any trouble:

╭─root@valen /export/autoradio  
╰─➤  chmod a+w autoradio.db
╭─root@valen /export/autoradio  
╰─➤  ls -al autoradio.db
-rw-rw-rw- 1 root root 2887050 12. Nov 2017  autoradio.db

Does this mean that a root user on the client machine isn't root on an NFS share?

  • 2
    Yes, root on NFS is treated differently, and there are options to turn that off (but think thoroughly before doing this; in doubt, don't). See e.g. this answer.
    – dirkt
    Commented Dec 26, 2019 at 15:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .