【问题标题】:Not able to change ownerships of a file无法更改文件的所有权
【发布时间】:2017-12-29 11:01:56
【问题描述】:
[vg324y@ulpv0143 ~]$ chown root hello.txt

chown: changing ownership of `hello.txt': Operation not permitted

[vg324y@ulpv0143 ~]$ chown ia982p hello.txt

chown: changing ownership of `hello.txt': Operation not permitted
[vg324y@ulpv0143 ~]$

此外,文件没有设置不可变位。

[vg324y@ulpv0143 ~]$ lsattr hello.txt
-------------e- hello.txt

有人可以帮忙解决上述问题吗?

【问题讨论】:

  • 能否请您显示文件的详细信息。只需 ls -l 文件即可。

标签: unix chmod


【解决方案1】:

您是否尝试过使用 sudo? 喜欢

sudo chown ia982p hello.txt

此外,您可以使用chattr 命令更改不可变位:

chattr +i hello.txt 用于设置和

chattr -i hello.txt 用于取消设置不可变标志

执行第一个命令后,应该设置不可变标志:

# lsattr hello.txt ----i-------- hello.txt

我希望这是您的问题的解决方案!

【讨论】:

    猜你喜欢
    • 2012-04-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-01-05
    • 2017-01-08
    • 2018-03-29
    相关资源
    最近更新 更多