我有一个文件,我需要更改其内容,它具有以下权限:
-rw-r--r-- 如何找出自己属于哪个权限组,这样才能执行chmod命令?
我只是试着做chmod,我得到了一个错误:
$ chmod 777 hosts
chmod: Unable to change file mode on hosts: Operation not permitted这是我的ls -l
-rw-r--r-- 1 root wheel 313 Apr 16 13:04 hosts发布于 2012-05-07 23:51:30
“'ls -l”会告诉你你需要知道的一切。
Permissions Directories Group Size Date Directory or file
drwx------ 2 users 4096 Nov 2 19:51 mail/如果您拥有root权限,请尝试使用“sudo chmod 777 hosts”。
发布于 2012-05-07 23:50:22
您可能不是该文件的所有者。
发布于 2012-05-07 23:53:50
文件的所有者将需要使用chown来更改权限或所有权,
以下是一些示例:http://en.wikipedia.org/wiki/Chown
https://stackoverflow.com/questions/10485092
复制相似问题