XAMPP why need to change application permission of application folder?

0

I have XAMPP installed on my Mac for local server hosting.
Whenever, I want to run my code on localhost I am required to change the permission of my application code. I do

sudo chmod -R 777 /Applications/XAMPP/htdocs/my-project

Only then does the project work.
How can I run the application code without changing the permission?

HBalyan

Posted 2017-01-25T14:53:45.040

Reputation: 103

1For future reference: Any manual which involves chmod -R 777 is wrong. – Hennes – 2017-01-25T15:04:13.907

Try using MAMP it works in the same way as XAMPP. It could solve the issue.

– alljamin – 2017-02-02T11:37:48.780

Answers

2

Its worth understanding what this does (and why its a terrible idea).

chmod -R 777 gives Read + Write + Execute permissions to any account. While it works, its roughly the equivalent of leaving your home unlocked, while you go to work, cause you can't find your keys.

Find out what user XAMPP is running at, give ownership to that user and use an appropriate set of permissions.

Also, OS X probably has a proper apache and mysql package you should consider. XAMPP isn't really the best option IMO.

Journeyman Geek

Posted 2017-01-25T14:53:45.040

Reputation: 119 122