通过sudoer改变文件所有权

时间:2017-09-12 16:53:39

标签: linux file-ownership superuser

让我们说我们有这种情况:

-rwxrwx-w- 1 user1 mygroup  0 Sep 12 16:53 testfile

sudoer可以更改此文件所有权吗?他必须是命令chown或存档的sudoer吗?

1 个答案:

答案 0 :(得分:2)

我错过了the ownership of any file in the system may only be altered by a super-user

的观点

第二组rwx显示任何mygroup成员的用户都可以读取,写入和执行此文件。

因此,如果用户user2是超级用户(存在于sudoers并具有足够的权限),他可以进行必要的更改。如果没有,那么他/她就无法修改所有权!