LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Apache 403 Forbidden Error On Every File (https://www.linuxquestions.org/questions/linux-software-2/apache-403-forbidden-error-on-every-file-389611/)

agtlewis 12-05-2005 07:55 PM

Apache 403 Forbidden Error On Every File
 
Hello,

I recently moved my /var/www folder to a new location on a seperate mounted partition because it was getting to large.

I have updated the apache configuration files to reflect this change.

Code:

DocumentRoot "/mnt/storage/server/www/html"

# Default Security Settings
 <Directory />
    Order Deny,Allow
    Deny from all
 </Directory>

# This should be changed to whatever you set DocumentRoot to.
<Directory "/mnt/storage/server/www/html">
    Options Indexes FollowSymLinks
    AllowOverride none
    Order Deny,Allow
    Allow from 192.168.1.4
    Allow from 192.168.1.3
</Directory>

The command to mount the hard drive is as follows.

Code:

/dev/hdb1              /mnt/storage            ext3    defaults        0 0
All of the files on this hard drive are world readable.

In my apache error log, I receive the following errors.

Code:

[Mon Dec 05 18:42:38 2005] [crit] [client 192.168.1.4] (13)Permission denied: /mnt/storage/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
[Mon Dec 05 18:42:38 2005] [crit] [client 192.168.1.4] (13)Permission denied: /mnt/storage/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
[Mon Dec 05 18:42:42 2005] [crit] [client 192.168.1.4] (13)Permission denied: /mnt/storage/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
[Mon Dec 05 18:42:42 2005] [crit] [client 192.168.1.4] (13)Permission denied: /mnt/storage/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
[Mon Dec 05 19:50:19 2005] [crit] [client 192.168.1.4] (13)Permission denied: /mnt/storage/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
[Mon Dec 05 19:50:20 2005] [crit] [client 192.168.1.4] (13)Permission denied: /mnt/storage/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

There are no .htaccess anywhere in the filesystem. Creating an .htaccess file doesn't fix the problem and the same error message is logged.

Any clues?

agtlewis 12-05-2005 09:05 PM

I changed the home directory for the apache account from /var/www to /mnt/storage/server which could possible have been the problem but the errors are still the same.

vikrambhimbar 12-05-2005 09:19 PM

1)does df command shows u r new HDD mounted...
2)If yes Try to give full permissions to the mounted files...
3) If U r Running any application from apache edit the permission ...including owner and group (try username and group apache)
4)Try To mount u r New HDD in "/" partion or in "/var/www"

agtlewis 12-05-2005 09:59 PM

Yes, the hard drive is mounted and the paths are correct. Giving full read write permission had no effect. I'm not sure what you mean by 3 and I don't want the hard drive mounted anywhere but /mnt/storage because it's used for other things.

Also selinux is disabled as well. I am stumped.

mgstrein047 09-01-2006 09:32 PM

I have been having the same problem as you. Any files on my new drive cannot seem to be read no matter what I do with permissions and what not. Let me know if you figure anything out.

debiant 09-01-2006 11:25 PM

Try setting the uid of the fstab entry to the uid of apache (probably not the best permanent solution).


All times are GMT -5. The time now is 09:56 PM.