Trusthefllow
Trusthefllow

Reputation: 51

Apache 2.4.7 / Search permissions

I'm getting current log :

[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

On browser :

Forbidden

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

What I have tested and not worked yet:

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

My current Gamefriend.conf file in apache2/sites-enabled folder

<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>

Did look for a .htaccess file trough the following command but not found :

tree -if / | grep .htaccess

Here come the folder permissions:

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

Upvotes: 1

Views: 3572

Answers (1)

Trusthefllow
Trusthefllow

Reputation: 51

Found a solution even though I don't know if it is secure.

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

Any commentaries would be appreciated on the fact of letting it search home and a user folder.

Upvotes: 3

Related Questions