gpt4 book ai didi

linux - Apache 2.4.7/搜索权限

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:49:20 25 4
gpt4 key购买 nike

我正在获取当前日志:

[Mon Nov 02 11:31:37.831384 2015] [core:error] [pid 15509] (13)Permission denied: [client 127.0.0.1:55073] AH00035: access to / denied (filesystem path '/home/sharkie/NetBeansProjects') because search permissions are missing on a component of the path

在浏览器上:

Forbidden

You don't have permission to access / on this server.
Apache/2.4.7 (Ubuntu) Server at gamefriend.local Port 80

我已经测试但还没有工作的:

Add to /etc/apache2/apache2.conf

<Directory /home/sharkie/NetBeansProjects/GameFriend/web/>
Require all granted
</Directory>

commands run on prompt

find /home/sharkie/NetBeansProjects/ -type f -exec chmod 644 {} \;
find /home/sharkie/NetBeansProjects/ -type d -exec chmod 755 {} \;
find /var/www/ -type f -exec chmod 644 {} \;
find /var/www/ -type d -exec chmod 755 {} \;
chmod +rwx /home/sharkie/NetBeansProjects/
chmod +rwx /home/sharkie/NetBeansProjects/GameFriend
chmod +rwx /home/sharkie/NetBeansProjects/GameFriend/web

我当前在 apache2/sites-enabled 文件夹中的 Gamefriend.conf 文件

<VirtualHost *:80>
ServerName gamefriend.local
DocumentRoot /home/sharkie/NetBeansProjects/GameFriend/web
DirectoryIndex app.php
ErrorLog /var/log/apache2/gamefriend-error.log
CustomLog /var/log/apache2/gamefriend-access.log combined
<Directory "/home/sharkie/NetBeansProjects/GameFriend/web">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

通过以下命令查找 .htaccess 文件但未找到:

tree -if / | grep .htaccess

这里是文件夹权限:

drwxr-xr-x  3 sharkie sharkie 4096 Nov  2 09:58 NetBeansProjects
Inside NetBeansProjects
drwxr-xr-x 7 sharkie sharkie 4096 Nov 2 09:58 GameFriend
Inside GameFriend
drwxr-xr-x 6 sharkie sharkie 4096 Nov 2 09:58 app
drwxr-xr-x 2 sharkie sharkie 4096 Nov 2 09:58 bin
-rw-r--r-- 1 sharkie sharkie 2148 Nov 2 09:58 composer.json
-rw-r--r-- 1 sharkie sharkie 61966 Nov 2 09:58 composer.lock
-rw-r--r-- 1 sharkie sharkie 79 Nov 2 09:58 README.md
drwxr-xr-x 3 sharkie sharkie 4096 Nov 2 09:58 src
drwxr-xr-x 14 sharkie sharkie 4096 Nov 2 09:58 vendor
drwxr-xr-x 3 sharkie sharkie 4096 Oct 27 20:00 web

最佳答案

找到了一个解决方案,尽管我不知道它是否安全。

chmod +x /
chmod +x /home/
chmod +x /home/sharkie/

对于让它搜索主页和用户文件夹的事实,我们将不胜感激。

关于linux - Apache 2.4.7/搜索权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33477056/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com