LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Can't get Apache to use Windows partition Directory (https://www.linuxquestions.org/questions/linux-networking-3/cant-get-apache-to-use-windows-partition-directory-279169/)

RavenLX 01-18-2005 02:34 AM

Can't get Apache to use Windows partition Directory
 
I'm trying to share data between two OSs.

Setup:

Single-user PC with LinkSys router and ADSL access.
/mnt/win_d is the partition that I am sharing between Windows 98SE and Mandrake 10.0 Linux
Apache 2.0 web server on Mandrake Linux side

I've set up the default server to have aliases in /etc/httpd/2.0/commonhttpd.conf:

Alias /win/cgi-bin/ /mnt/win_d/html/cgi-bin/
Alias /win/ /mnt/win_d/html/

I set up default server directories in /etc/httpd/2.0/httpd.conf as:

<Directory /mnt/win_d/html>
AllowOverride All
Options MultiViews -Indexes Includes FollowSymLinks
<IfModule mod_access.c>
Order allow,deny
Allow from all
</IfModule>
</Directory>

<Directory /mnt/win_d/html/cgi-bin>
Options +ExecCGI -Includes -Indexes
SetHandler cgi-script
<IfModule mod_access.c>
Order allow,deny
Allow from all
</IfModule>
</Directory>

Now when I go to http://localhost/win/ I get this:

403 Forbidden

You don't have permission to access /win/ on this server.

The /var/log/httpd/error_log file shows this:

[error] [client 127.0.0.1] client denied by server configuration: /mnt/win_d/html/

Now, the permissions for that directory are: drwxrwxrwx with user/group both root.

unmounting and changing the user to apache and remounting changes the user back to root again.

HOW do I get it so I can access the files on the win_d partition? I NEED to do this as I need to work in both linux and windows side with the same data.

marghorp 01-18-2005 02:48 AM

I believe it is a security precaution that the www directory must not have rwxrwxrwx permissions due to security issues it causes. Change it to rwxr-xr-x and it should work.

RavenLX 01-18-2005 09:58 AM

Sorry, your suggestion didn't work. Changing the /mnt/html permissions (as root) from 777 to 755 doesn't stop the 403 error from occurring. It is a permissions problem, but somehow it had to do with not the files (which permissions are set on all win partition files and directories for world read/write by default anyway, which should work), but the fact that it's a WINDOWS partition and somehow Apache 2 doesn't like it. There has to be some way somehow to get Apache 2 to work with a Windows partition under linux. But how?

Reading the error, the CLIENT (127.0.0.1) was denied access. Meaning that /mnt/win_d isn't allowed to be accessed from a server (ie. domain 127.0.0.1). However, I can read/write to the /mnt/win_d just fine in Konqueror, and share files with Thunderbird (I use it in both OSs and have local folders set on a dir on win_d). So I can access the directory, but not via Apache.

Somehow I need to set Apache to allow clients (particularly from 127.0.0.1) to also use /mnt/win_d directory.

BTW, I am also using Webmin to set up Apache as it's a little easier to navigate, so if anyone knows what settings are to be made, please tell me how or else when giving settings in raw code, tell me which file to put the code in and where in the file (in cases where placement matters).

RavenLX 01-18-2005 01:42 PM

I found a solution to the problem! :) I've wrote a document on it and posted it here:

http://www.linuxquestions.org/questi...hreadid=279380

Thanks, marghorp for replying anyway. :) At least it was worth a try.


All times are GMT -5. The time now is 10:37 PM.