Ask Your Question
0

root not permitted to chown for user owned directory

asked 2017-11-27 03:30:12 -0500

Guus gravatar image

updated 2017-11-27 04:00:22 -0500

I have been using Fedora since Redhat 7 was taken out of market. As a root I have always been able to do everything with files, whether user owned or root owned. Now I am preparing to use backup-manager and it wants to chown from the user to the root. I run backup-manager as root. It is not allowed to. So I rand it manually and got the same output. The output I get is:

 root  /  data  backup  chown root:root backup-manager

chown: changing ownership of 'backup-manager': Operation not permitted

Because I had used sudo -i to get into root, I also logged in directly as root on a virtual terminal (Ctrl-F3 or such) with the same result.

EDIT: the partition that the directory is part is mounted with NFS4 from a server. The server is my own as well. Would it be NFS that is preventing the change?

EDIT2: I am running an updated Fedora 27.

Why would root not be able to change a directory owner?

Kind regards, Guus Bonnema.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
3

answered 2017-11-27 05:15:56 -0500

fcomida gravatar image

Usually it's not desiderable that root in the client machine is treated the same as root in the server machine and its uid 0 is mapped to another id (root squashing). Use no_root_squash option, see exports(5)

edit flag offensive delete link more

Comments

Thank you for your response. It seems the root was not trusted from the nfs server. Although my nfs server is not open to the internet, I am wondering if there is a safer way to arrange for this.

The problem is that backup-manager requires root and automatically checks ownership of the directory and does a chown.

So I solved it for now, but I am not sure I am opening my machine to all kinds of other problems.

So I cannot help but wonder if there is an other way to solve it.

Guus gravatar imageGuus ( 2017-11-28 02:53:36 -0500 )edit

Since both machines are under your control I don't see any problem.

fcomida gravatar imagefcomida ( 2017-11-28 12:44:05 -0500 )edit

Question Tools

Stats

Asked: 2017-11-27 03:30:12 -0500

Seen: 434 times

Last updated: Nov 27 '17