MAMP 开发环境中的权限

发布于 2024-09-15 17:30:34 字数 316 浏览 2 评论 0原文

我使用 MAMP 作为我的本地开发环境。我一直遇到的一个问题是可靠地设置文件夹/文件权限。

例如,我当前有一个图像文件夹,需要 666 权限。在 mac finder 的更多信息菜单中,我的权限是读取和;写。但是,在 Dreamweaver 权限对话框中,同一文件夹的权限为 000。每次我离开对话框时都会重置为 000。

所以我有一个屏幕说我有完全权限,另一个屏幕说我没有同一个文件夹的权限。当尝试测试上传到此文件夹时,我的脚本在从 tmp 位置移动文件时返回错误。

chmod ($directory, 0755) 返回 false。

临时文件存在

I use MAMP as my local development environment. A persistent problem I have is reliably setting folder/file permissions.

For example, I currently have an images folder I need 666 permissions on. In the more info menu in the mac finder my permissions are read & write. However in the Dreamweaver permissions dialog the same folder has 000 permissions. This resets to 000 every time I leave the dialog.

So I have one screen saying I have full permission and another saying I have none for the same folder. When attempting test uploads to this folder, my script returns an error when moving the file from the tmp location.

chmod ($directory, 0755) returns false.

The temporary file exists

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

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

发布评论

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

评论(1

笔落惊风雨 2024-09-22 17:30:34

文件夹应该有一个执行位,在本例中为 777。
如果没有它,则无法读取该文件夹。

A folder should have an execute bit, in this case 777.
Without it, the folder can't be read.

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