XAMPP: How to make apache webserver owner of folder /htdocs

孤街浪徒 提交于 2019-12-13 01:29:14

问题


I am using XAMPP and apache as webserver. I have permission problems with a website of mine that requires write access to a temporary folder in the project folder /htdocs/myProject/tmp

It think my problem is that my site runs on my localhost and I copied the project with my regular desktop user into the htdocs folder. Apache seems to lack write permissions.

My question is now: How do I found out which user group apache belongs to in order to make that group owner of the folder? That should fix my permission problem, shouldn't?


回答1:


As far as I understand, the Apache (Webserver) has an own user called "www-data". Maybe an already answered question on SO has a solution, which you can use.

  • The used command relies on a linux-based system and that you navigated in a terminal to a directory, where /htdocs is located.

  • This command in the answer of the link below allows you as a humanoid user to write and work in this specified directory.

  • You add www-data (Apache) to use this directory, too.

  • New files of that chown'ed directory will 'inherit' the owners.

The Link and further descriptions can be found here on Stackoverflow.com: www-data permissions



来源:https://stackoverflow.com/questions/24141556/xampp-how-to-make-apache-webserver-owner-of-folder-htdocs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!