Web Servers on Unix and Linux - 403 error when symlink over to another disk

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers on Unix and Linux > August 2005 > 403 error when symlink over to another disk





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author 403 error when symlink over to another disk
Sandy

2005-08-19, 2:53 am

I've looked everywhere for a solution to this.

I'm trying to move most of my web site to another disk than / (they're
now in /var/www/html/)

I keep getting forbidden 403 pages when i try to access them.

permissoins appear to be correct:
># ls -Z /mnt/sandy1

drwx------ root root
lost+found
drwxr-xr-x root root system_u:object_r:httpd_sys_content_t
pub_html
drwxr-xr-x root root root:object_r:file_t users

(I want pub_html to be accessed)

I've tried both "ln -s" from DocumentRoot and Alias from the
httpd.conf. I assume that i'm being redirected, but have something
wrong with the permissions in pub_html.

I've also added the following to httpd.conf

<Directory "/mnt/sandy1/pub_html">
Options Indexes FollowSymLinks
AllowOverride None

Order allow,deny
Allow from all
</Directory>


I notice that there is no selinux permissions for the actual mount
point /mnt/sandy1 ... Perhaps I need to specify selinux permissions for
the hard disk somehow?

Thanks,
Sandy

Grant Coady

2005-08-19, 2:53 am

On 18 Aug 2005 20:57:03 -0700, "Sandy" <xandey@gmail.com> wrote:

>I've looked everywhere for a solution to this.
>
>I'm trying to move most of my web site to another disk than / (they're
>now in /var/www/html/)
>
>I keep getting forbidden 403 pages when i try to access them.


Fix permissions. Unix don't care what disks the partitions are on :-p

Grant.

Sandy

2005-08-19, 5:51 pm

I think the permissions are correct Grant, could you tell me what i'm
doing wrong

drwxr-xr-x root root system_u:object_r:httpd_sys_content_t
pub_html

Sandy

2005-08-19, 5:51 pm

After reading some more about permissoins. I've also checked that all
files in the path have x permissions. And that the directory has 755
permissions and any files in it have 644.

I've also tried moving the target to being owned by a user. But nothing
had any effect.

the log contains the following error message:
[Fri Aug 19 11:45:48 2005] [error] [client 151.197.41.124]
(13)Permission denied: access to /sandy1/ denied

Sandy

2005-08-19, 5:51 pm

I'm using FC4, and want this to work with SElinux. I've set the
permissions to what i believe to be the correct ones

system_u:object_r:httpd_sys_content_t

What about the path upto the target of my symlink? I notice that the
mount point doesn't have any SElinux permissions at all, it shows as
blank in ls -lZ

Thanks,
Sandy

Sandy

2005-08-19, 5:51 pm

I found the answer. I needed to do the following because something had
happened with my SELinux ... somethings

touch /.autorelabel
reboot

as per http://www.nsa.gov/selinux/list-archive/0502/10358.cfm

Hope this can help someone else.

Sandy

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com