You are not logged in.

#1 2012-02-03 21:31:02

Jabrick
Member
Registered: 2011-05-13
Posts: 79

[SOLVED] Drupal Access Forbidden?

Ok so I'm trying to run a local webserver with Drupal.
I believe I have installed my Lamp server correctly.
Although when I visited localhost I didn't get a test page but rather a listing of the directory of my /svr/http.
I made a test php as the arch suggested and it worked fine.
Afterward I installed postfix and drupal.
I have configured all settings based on the arch wiki.
I turned on httpd, mysqld, and postfix.

The problem is when I try to get into Drupal I get forbidden access.
I'm not sure why this is.
I used ls -l in my /srv/http/ folder and I have the exact same permissions setting for my phpmyadmin folder and my drupal folder.
I can access my phpmyadmin folder.
So I don't know why I can't use drupal.
I installed it with pacman.

total 12
drwxr-xr-x 8 root root 4096 Feb  3 16:09 drupal
drwxr-xr-x 2 root root 4096 Feb  3 15:42 phpmyadmin
-rw-r--r-- 1 root root   21 Feb  3 15:02 test.php

Please can someone help me out?
Thank you.

EDIT: I also followed the readme for INSTALL.mysql.tut

Last edited by Jabrick (2012-02-03 23:31:19)

Offline

#2 2012-02-03 21:48:04

owain
Member
Registered: 2009-08-24
Posts: 251

Re: [SOLVED] Drupal Access Forbidden?

What are the permissions on files inside the drupal folder?

Also, shouldn't the group of the folder be the user Apache is running as (www-data on Debian, can't remember what it is on Arch), with 750 permissions?

Offline

#3 2012-02-03 22:08:16

Jabrick
Member
Registered: 2011-05-13
Posts: 79

Re: [SOLVED] Drupal Access Forbidden?

File permissions in Drupal

-rw-r--r--  1 root root  6605 Feb  3 16:09 authorize.php
-rw-r--r--  1 root root 63171 Feb  3 16:09 CHANGELOG.txt
-rw-r--r--  1 root root   996 Feb  3 16:09 COPYRIGHT.txt
-rw-r--r--  1 root root   720 Feb  3 16:09 cron.php
drwxr-xr-x  4 root root  4096 Feb  3 16:09 includes
-rw-r--r--  1 root root   529 Feb  3 16:09 index.php
-rw-r--r--  1 root root  1447 Feb  3 16:09 INSTALL.mysql.txt
-rw-r--r--  1 root root  1874 Feb  3 16:09 INSTALL.pgsql.txt
-rw-r--r--  1 root root   688 Feb  3 16:09 install.php
-rw-r--r--  1 root root  1298 Feb  3 16:09 INSTALL.sqlite.txt
-rw-r--r--  1 root root 17856 Feb  3 16:09 INSTALL.txt
-rw-r--r--  1 root root 18092 Feb  3 16:09 LICENSE.txt
-rw-r--r--  1 root root  7975 Feb  3 16:09 MAINTAINERS.txt
drwxr-xr-x  4 root root  4096 Feb  3 16:09 misc
drwxr-xr-x 42 root root  4096 Feb  3 16:09 modules
drwxr-xr-x  5 root root  4096 Feb  3 16:09 profiles
-rw-r--r--  1 root root  3494 Feb  3 16:09 README.txt
-rw-r--r--  1 root root  1561 Feb  3 16:09 robots.txt
drwxr-xr-x  2 root root  4096 Feb  3 16:09 scripts
lrwxrwxrwx  1 root root    21 Feb  3 16:09 sites -> /var/lib/drupal/sites
drwxr-xr-x  8 root root  4096 Feb  3 16:09 themes
-rw-r--r--  1 root root 19338 Feb  3 16:09 update.php
-rw-r--r--  1 root root  9453 Feb  3 16:09 UPGRADE.txt
-rw-r--r--  1 root root  2051 Feb  3 16:09 web.config
-rw-r--r--  1 root root   417 Feb  3 16:09 xmlrpc.php

I tried Apache but it doesn't exist so I tried changing to http.
These are my groups

root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/bin/false
daemon:x:2:2:daemon:/sbin:/bin/false
mail:x:8:12:mail:/var/spool/mail:/bin/false
ftp:x:14:11:ftp:/srv/ftp:/bin/false
http:x:33:33:http:/srv/http:/bin/false
nobody:x:99:99:nobody:/:/bin/false
dbus:x:81:81:System message bus:/:/bin/false
reza:x:1000:100::/home/reza:/bin/bash
avahi:x:84:84:avahi:/:/bin/false
mpd:x:45:45::/var/lib/mpd:/bin/true
tor:x:43:43::/var/lib/tor:/bin/false
polipo:x:999:999::/var/cache/polipo/:/bin/false
privoxy:x:42:42::/var/spool/privoxy:/bin/false
mysql:x:89:89::/var/lib/mysql:/bin/false
postfix:x:73:73::/var/spool/postfix:/bin/false

I've tried running a local server in the past and my files were located on /var/www/
But with Arch I think it is located in /srv/http/
Because that's where I got when I type localhost in my browser
Oh an phpMyAdmin doesn't work I get the same error for when trying to access localhost/drupal
I do not see in my localhost.

Edit: If I create a random directory in /srv/http I can access it

Last edited by Jabrick (2012-02-03 22:15:57)

Offline

#4 2012-02-03 22:22:10

Jabrick
Member
Registered: 2011-05-13
Posts: 79

Re: [SOLVED] Drupal Access Forbidden?

Ok I think i figured out the problem
I had to comment out
deny from all
in my .htaccess file.
Still getting errors but I will work on it and post back if I get stuck
Thanks

Offline

#5 2012-02-03 22:28:52

owain
Member
Registered: 2009-08-24
Posts: 251

Re: [SOLVED] Drupal Access Forbidden?

Jabrick wrote:

Ok I think i figured out the problem
I had to comment out
deny from all
in my .htaccess file.
Still getting errors but I will work on it and post back if I get stuck
Thanks

That would explain a lot smile

Do take a good look at the documentation on the Drupal site, even if you're not following it directly.

Offline

#6 2012-02-03 22:47:49

Jabrick
Member
Registered: 2011-05-13
Posts: 79

Re: [SOLVED] Drupal Access Forbidden?

Thanks owain for the kind help, as I am new to web development, but am trying to get serious about it!
Just one more thing I can't seem to clarify.
When I get to the Drupal installer I'm presented with alot of warning messages.
Namely:

Warning: file_exists(): open_basedir restriction in effect. File(/srv/http/drupal/sites/sites.php) is not within the allowed path(s): (/srv/http/:/home/:/tmp/:/usr/share/pear/) in conf_path() (line 561 of /srv/http/drupal/includes/bootstrap.inc).
Warning: file_exists(): open_basedir restriction in effect. File(/srv/http/drupal/sites/localhost.drupal/settings.php) is not within the allowed path(s): (/srv/http/:/home/:/tmp/:/usr/share/pear/) in conf_path() (line 574 of /srv/http/drupal/includes/bootstrap.inc).
Warning: file_exists(): open_basedir restriction in effect. File(/srv/http/drupal/sites/localhost/settings.php) is not within the allowed path(s): (/srv/http/:/home/:/tmp/:/usr/share/pear/) in conf_path() (line 574 of /srv/http/drupal/includes/bootstrap.inc).
Warning: file_exists(): open_basedir restriction in effect. File(/srv/http/drupal/sites/default/settings.php) is not within the allowed path(s): (/srv/http/:/home/:/tmp/:/usr/share/pear/) in drupal_settings_initialize() (line 726 of /srv/http/drupal/includes/bootstrap.inc).
Warning: file_exists(): open_basedir restriction in effect. File(sites/default/themes) is not within the allowed path(s): (/srv/http/:/home/:/tmp/:/usr/share/pear/) in drupal_system_listing() (line 5168 of /srv/http/drupal/includes/common.inc).
Warning: is_dir(): open_basedir restriction in effect. File(sites/all/themes) is not within the allowed path(s): (/srv/http/:/home/:/tmp/:/usr/share/pear/) in file_scan_directory() (line 2026 of /srv/http/drupal/includes/file.inc).
Warning: file_exists(): open_basedir restriction in effect. File(sites/default/themes/engines) is not within the allowed path(s): (/srv/http/:/home/:/tmp/:/usr/share/pear/) in drupal_system_listing() (line 5168 of /srv/http/drupal/includes/common.inc).
Warning: is_dir(): open_basedir restriction in effect. File(sites/all/themes/engines) is not within the allowed path(s): (/srv/http/:/home/:/tmp/:/usr/share/pear/) in file_scan_directory() (line 2026 of /srv/http/drupal/includes/file.inc).
Warning: file_exists(): open_basedir restriction in effect. File(sites/default/modules) is not within the allowed path(s): (/srv/http/:/home/:/tmp/:/usr/share/pear/) in drupal_system_listing() (line 5168 of /srv/http/drupal/includes/common.inc).
Warning: is_dir(): open_basedir restriction in effect. File(sites/all/modules) is not within the allowed path(s): (/srv/http/:/home/:/tmp/:/usr/share/pear/) in file_scan_directory() (line 2026 of /srv/http/drupal/includes/file.inc).
Warning: file_exists(): open_basedir restriction in effect. File(sites/default/modules) is not within the allowed path(s): (/srv/http/:/home/:/tmp/:/usr/share/pear/) in drupal_system_listing() (line 5168 of /srv/http/drupal/includes/common.inc).
Warning: is_dir(): open_basedir restriction in effect. File(sites/all/modules) is not within the allowed path(s): (/srv/http/:/home/:/tmp/:/usr/share/pear/) in file_scan_directory() (line 2026 of /srv/http/drupal/includes/file.inc).
Warning: file_exists(): open_basedir restriction in effect. File(sites/default/modules) is not within the allowed path(s): (/srv/http/:/home/:/tmp/:/usr/share/pear/) in drupal_system_listing() (line 5168 of /srv/http/drupal/includes/common.inc).
Warning: is_dir(): open_basedir restriction in effect. File(sites/all/modules) is not within the allowed path(s): (/srv/http/:/home/:/tmp/:/usr/share/pear/) in file_scan_directory() (line 2026 of /srv/http/drupal/includes/file.inc).
Warning: file_exists(): open_basedir restriction in effect. File(sites/default/themes/seven) is not within the allowed path(s): (/srv/http/:/home/:/tmp/:/usr/share/pear/) in drupal_system_listing() (line 5168 of /srv/http/drupal/includes/common.inc).
Warning: is_dir(): open_basedir restriction in effect. File(sites/all/themes/seven) is not within the allowed path(s): (/srv/http/:/home/:/tmp/:/usr/share/pear/) in file_scan_directory() (line 2026 of /srv/http/drupal/includes/file.inc).

Through google it seems like these have to do with modules in drupal.
But I haven't completed the installation yet.
So is it find if I just proceed?
I'm not sure what the problem is.

Offline

#7 2012-02-03 23:18:20

owain
Member
Registered: 2009-08-24
Posts: 251

Re: [SOLVED] Drupal Access Forbidden?

If you want to get knowledge of web development, and you're happy that you've got your local LAMP setup sorted, then maybe you'd be better following the Drupal installation documentation directly?

You won't benefit from package management, but everything you'll 'install' will be under /srv/http, or /var/www, or wherever you choose to put it (and tell apache to look for it). The advantage is that all of the information on the Drupal site will be directly applicable. More importantly, the knowledge gained will not depend on the distro being used.

Last edited by owain (2012-02-03 23:19:31)

Offline

#8 2012-02-03 23:31:05

Jabrick
Member
Registered: 2011-05-13
Posts: 79

Re: [SOLVED] Drupal Access Forbidden?

Okay your right I guess I was just frustrated form before and looked for an easy way out.
I admit that was bad sad
Yeah I think I am starting to pinpoint the issue.
Thanks very much.
Problems solved smile

Offline

Board footer

Powered by FluxBB