在 Ubuntu 中授予用户对 htdocs 的权限 [英] Give user permissions to htdocs in Ubuntu
问题描述
我在 Ubuntu 中以 root 权限安装了 opt/lampp 文件夹的 xampp.但是我无法访问 htdocs 文件夹并且无法启动 apache 服务器,因为 lampp 文件夹只有 root 权限.我该如何解决这个问题,有什么合适的方法可以解决这个问题吗?在 Ubuntu 中安装 xampp
I installed xampp with root permission to opt/lampp folder in Ubuntu.but i cant access htdocs folder and unable to start apache server since the lampp folder has only root permission.How can i solve this and are there any proper way to install xampp in Ubuntu
推荐答案
要更改 htdocs 文件夹的所有权,请运行以下命令.[代替使用您自己的用户名的用户名]
To change ownership of htdocs folder run following command. [Replace username with your own username]
sudo chown -R username:username /opt/lampp/htdocs
我们还需要更新 httpd.conf 文件.运行以下命令打开apache配置文件:sudo gedit/opt/lampp/etc/httpd.conf
We also need to update httpd.conf file. Run following command to open
apache configuration file:
sudo gedit /opt/lampp/etc/httpd.conf
找到以下行:
User nobody
Group nogroup
图片的完整答案在 这篇文章
这篇关于在 Ubuntu 中授予用户对 htdocs 的权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!