OS X 对 /usr/local/lib 的权限被拒绝

发布于 2024-09-12 17:12:18 字数 652 浏览 1 评论 0原文

我正在寻找有关权限问题的任何建议/直觉/线索/答案,自从我切换到新的 Macbook Pro 以来,这个问题一直困扰着我。这就是困境。某些程序在安装期间复制 /usr/local/lib 下的库,并且在运行这些程序时出现崩溃,我认为这与此文件夹中文件的权限限制有关。我在尝试安装 audacity 插件时遇到错误(无法从此路径访问文件),然后尝试在此文件夹下执行“ls”。除非我在 cmd 前加上 sudo 前缀,否则我会立即收到权限被拒绝的消息。我尝试使用我的用户帐户拥有 /usr/local/lib/audacity 文件夹,但即使如此,我仍然收到这些文件的权限错误。值得注意的是,这个问题并非 Audacity 所独有。我在 Polycom 视频会议软件中也遇到过同样的问题,而且我也无法在这台计算机上运行 Parallels。 (我没有追踪 Parallels 到同一个问题,但我打赌它是相关的。)我依稀记得我以前使用过的一些奇怪的 Linux cmd 魔法,它不仅会向用户授予权限,还会调整一些低级别的内容位允许/禁用某些事情,例如执行,我似乎记得许可的事情比执行更深入,但已经好几年了。我不记得细节了,我想知道 OS X 上是否有类似的东西我可能忽略了。该位置和其中的文件有什么特别之处吗?我是否可以以某种方式更改我的文件系统,使文件看起来不同?就其价值而言,如果我以 root 身份登录,我似乎能够使用至少一个程序。我还没有尝试过其他程序,因为我刚刚发现了这种能力。请帮忙。

I'm looking for any advice/intuition/clues/answers on a permission issue that has been plaguing me ever since I switched over to a new Macbook pro. Here's the dilemma. Certain programs copy libraries under /usr/local/lib during install and upon running these programs I get a crash which I believe is related to permission restrictions to files in this folder. I've had errors (can't access files from this path) trying to install plugins for audacity and then tried doing an "ls" under this folder. I immediately get permission denied unless I prefix the cmd with sudo. I've tried owning the /usr/local/lib/audacity folder with my user account and even still I get permissions errors on these files. It's important to note that the problem is not exclusive to Audacity. I've seen the same problem with Polycom video conference software and I've also been unable to run Parallels on this machine. (I haven't traced Parallels to the same issue but I'm betting its related.) I vaguely recall some weird Linux cmd magic I used to use back in the day that would not only grant permission to a user but tweak some low level bits allowing/disabling certain things like execution and I seem to recall the permission thing ran deeper than execution but its been years. I can't recall the detils and I'm wondering if there's something similar on OS X that I'm possibly overlooking. Is there something special about that location and the files there in? Could I have somehow altered my file system in a way tht the files appear different? For what its worth, I seem to be able to use at least one of the programs if I log in as root. I haven't tried with the other programs as I've just discovered the ability. Please help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

纵山崖 2024-09-19 17:12:18

听起来该文件夹不是全局可执行文件。尝试:

sudo chmod 755 /usr/local/lib

然后您应该能够使用 ls 或文件夹中的其他任何内容(仍然不允许您写入,但您的用户帐户无论如何都不能这样做)

It sounds like the folder isn't world executable. Try:

sudo chmod 755 /usr/local/lib

and then you should be able to use ls or anything else in the folder (still won't allow you to write but your user account shouldn't be able to do that anyway)

萝莉病 2024-09-19 17:12:18

从同事那里找到了答案。该文件夹需要标记为可执行。

sudo chmod 755 /usr/local/lib

修复一切!

Found the answer from a coworker buddy. The folder needed to be marked executable.

sudo chmod 755 /usr/local/lib

fixes everything!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文