简体   繁体   English

MacOSx上的XAMPP权限问题

[英]XAMPP permission issue on MacOSx

I have an issue with my XAMPP installation on MacOSx Yosemite. 我在MacOSx Yosemite上安装XAMPP时遇到问题。

I have looked at a couple of threads, specifically this one XAMPP permissions on Mac OS X? 我看了几个线程,特别是Mac OS X上的这个XAMPP权限?

I have tried the solutions there but i havent gotten any of them to work. 我在那里尝试过解决方案,但没有任何一个可以使用。

I am running a website on it that reads, and creates files in php. 我正在运行一个网站,该网站可以读取并创建PHP文件。 I need to authorize access to the htdocs folder by right clicking it going into info, and them unlocking the padlock. 我需要通过右键单击进入信息的htdocs文件夹来授权访问权限,然后他们才能解锁挂锁。 Only then can I write files. 只有这样我才能写文件。 This is very annoying, and not ideal for working on the site. 这很烦人,对于在网站上工作并不理想。

If Xammp use a different user like www-data, you can change owner of the directory in recursive mode with chown. 如果Xammp使用www-data等其他用户,则可以使用chown以递归方式更改目录的所有者。

sudo chown xampp-user /path/to/directory -R

And you may need to change chmod for that directories. 您可能需要更改该目录的chmod。

sudo chmod 755 /path/to/directory -R

But when you copy or move a directory from another place to xampp path, you'll need to do these steps again cause owner will be different. 但是,当您将目录从另一个位置复制或移动到xampp路径时,您将需要再次执行这些步骤,因为所有者将有所不同。 And i agree this is not a ideal environment. 我同意这不是理想的环境。

Personally it will be easier using vagrant for development. 就个人而言,使用无业游民进行开发会更容易。 To put it simply, it's a headless virtualbox. 简而言之,这是一个无头的虚拟盒子。 This way you won't have a problem about permissions or something like that. 这样,您就不会有权限方面的问题。 If you did not use vagrant before puphpet is a good place to create a local environment. 如果您在puphpet之前没有使用过流浪汉, 那么它是创建本地环境的好地方。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM