本文介绍了chmod 777 -R在获取chmod的现有路径上:-R:无此类文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Mac上使用sudo chmod 777 -R <path>授予操作访问权限,我再次检查了给定的路径,它既存在又没有错别字,但是我仍然得到了chmod: -R: No such file or directory.关于我为什么会收到此错误的任何想法?

I wanted to grant operation access using sudo chmod 777 -R <path> on mac, I double checked the given path, and it's existing and no typos, but I still got chmod: -R: No such file or directory. Any ideas about why I'm getting this error?

推荐答案

如果您从chmod手册页上查看简介,则会发现以下问题:

If you look at the synopsis from the man page for chmod you will se the following:

-R标志应在实际文件模式之前使用,因此您需要这样调用命令:

The -R flag should be used before the actual file mode, so you need to call the command like this:

sudo chmod -R 777 <path>

现在,您正在尝试为名为-R的文件设置777权限,该文件当然不存在.

Right now you are trying to set 777 permission on a file named -R which of course does not exist.

这篇关于chmod 777 -R在获取chmod的现有路径上:-R:无此类文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 02:58