XAMPP:如何使Apache Webserver成为文件夹/htdocs的所有者 [英] XAMPP: How to make apache webserver owner of folder /htdocs
问题描述
我正在使用XAMPP和apache作为Web服务器.我的网站存在权限问题,该网站要求对项目文件夹/htdocs/myProject/tmp
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
它认为我的问题是我的站点在本地主机上运行,我用常规的桌面用户将项目复制到了htdocs文件夹中. Apache似乎缺乏写权限.
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.
我的问题现在是:如何确定apache属于哪个用户组,以使该文件夹成为该组的所有者?那应该可以解决我的权限问题,不是吗?
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?
推荐答案
据我了解,Apache(Web服务器)有一个自己的用户,称为"www-data".也许关于SO的已经回答的问题有一个解决方案,您可以使用.
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.
-
所使用的命令依赖于基于linux的系统,并且您已在终端中导航到/htdocs所在的目录.
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.
您也添加了www-data(Apache)来使用此目录.
You add www-data (Apache) to use this directory, too.
该 chown 的新文件 的目录将继承"所有者.
New files of that chown'ed directory will 'inherit' the owners.
链接和更多描述可以在Stackoverflow.com上找到: www-data权限
The Link and further descriptions can be found here on Stackoverflow.com: www-data permissions
这篇关于XAMPP:如何使Apache Webserver成为文件夹/htdocs的所有者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!