Forum Moderators: bakedjake
I'm very new in these things of webservices configuring.
I have a home LAN, with one box running Mandrake 8.0i and some computers in it running Windows.
One of them has an 80GB disk which I'd like to "share" trough my httpd.
I mapped the Windows share with smbmount and it works ok.
I've mapped it with the apache user and it's ok, it reads the Win share.
I also wrote this in /etc/httpd/commonhttp.conf:
Alias /sa /mnt/sharedana/
The beginning of the file reads:
### Common server configuration
#
User apache
Group apache
#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed. This address appears on some server-generated pages, such
# as error documents.
#
ServerAdmin magicmind@netcabo.pt
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot /mnt/windows/MagiCminD
and this windows/MagiCminD is, of course, a local dir in hda5.
The /mnt/sharedana, on the other hand, is the shared folder in the windows XP professional computer.
It's being recognized by the httpd, but with access denied!
BTW, when mounting the share I used, under the apache account:
smbmount //ana/shared sharedana -o username=Ana Mota dmask=777 fmask=777 rw
Now...
What I see when I do an ls -la in /mnt is:
[root@magicsrv /mnt]# ls -la
total 25
drwxr-xr-x 9 root root 4096 Mar 1 20:29 ./
drwxr-xr-x 21 root root 4096 Apr 16 2002 ../
drwxrwxr-x 2 root root 4096 Apr 24 2002 ana/
drwxrwxrwx 1 root root 0 Mar 1 20:40 cdrom/
drwxrwxr-x 2 root root 4096 Mar 27 2001 disk/
drwxrwxrwx 1 root root 0 Mar 1 20:40 floppy/
drwx------ 1 root root 512 Mar 3 20:02 ftana/
drwx------ 1 root root 512 Mar 3 20:02 sharedana/
drwxrwxrwx 8 root root 8192 Jan 1 1970 windows/
[root@magicsrv /mnt]#
Which doesn't seem to be what I've asked for when I mounted the share...
Can anyone help?
I just want to share the other computer's folder...
Oh, the release of the apache server is:
Server version: Apache-AdvancedExtranetServer/1.3.19 (Linux-Mandrake/3mdk)
Server built: Apr 16 2001 07:50:02
Thank you all.
before checking out the configuration of apache, be shure the mount of the windows folder/drive went right.
while using smbmount, specify the whole mount-path. in you case it seems to me that you want it mounted in /mnt/sharedana. if so, use the ls command in that path to verify wether it's working or not. if this is working as intended, you can continue with part 2 - the apache.conf. just post again then.
one tip left: for your samba share use ntfs filesystem on the windows side or samba will run into probs from time to time.
Well, it does work.
The samba mapping is working fine.
[root@magicsrv conf]# cd /mnt/sharedana/
[root@magicsrv sharedana]# ls -la
total 5
drwx------ 1 root root 512 Mar 3 20:02 ./
drwxr-xr-x 9 root root 4096 Mar 1 20:29 ../
drwx------ 1 root root 512 Mar 3 20:02 Musicas/
drwx------ 1 root root 512 Mar 1 20:55 wellcome/
[root@magicsrv sharedana]# mkdir test
[root@magicsrv sharedana]# ls -la
total 6
drwx------ 1 root root 512 Mar 4 02:18 ./
drwxr-xr-x 9 root root 4096 Mar 1 20:29 ../
drwx------ 1 root root 512 Mar 3 20:02 Musicas/
drwx------ 1 root root 512 Mar 4 02:18 test/
drwx------ 1 root root 512 Mar 1 20:55 wellcome/
[root@magicsrv sharedana]#
So, what's next?
I also wrote this in /etc/httpd/commonhttp.conf:
Alias /sa /mnt/sharedana/
that means if you connect to your apache server (don't know the host), and request /sa, you should get at least a directory index (if indexing is on) or a 403 forbidden message.
the url should be like:
[ip-linux-box...]
so what do you get?
On this particular case I get an 403
THAT is my real problem...
I don't have a domain in that winXP, just workgroup...
The samba mapping is working with the user I told and blank pass, which is correct...
Still, I got the 403.
[magicmind.sytes.net...]
This should do it... at least to list the directories...
:/
[root@magicsrv conf]# cd /mnt/sharedana/
[root@magicsrv sharedana]# ls -la
total 5
drwx------ 1 root root 512 Mar 3 20:02 ./
192.168.0.2 - - [04/Mar/2003:01:14:54 +0000] "GET /sa/ HTTP/1.1" 403 302 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
192.168.0.2 - - [04/Mar/2003:01:14:55 +0000] "GET /sa/ HTTP/1.1" 403 302 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
192.168.0.2 - - [04/Mar/2003:01:14:55 +0000] "GET /sa/ HTTP/1.1" 403 302 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
192.168.0.2 - - [04/Mar/2003:02:24:59 +0000] "GET /sa/ HTTP/1.1" 403 302 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
192.168.0.2 - - [04/Mar/2003:02:25:03 +0000] "GET /sa HTTP/1.1" 301 325 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
192.168.0.2 - - [04/Mar/2003:02:25:09 +0000] "GET /sa/index.htm HTTP/1.1" 403 311 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
192.168.0.2 - - [04/Mar/2003:02:25:14 +0000] "GET /sa/index.html HTTP/1.1" 403 312 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
I know about that permissions thing.
The problem is :
[root@magicsrv /mnt]# ls -la
total 25
drwxr-xr-x 9 root root 4096 Mar 1 20:29 ./
drwxr-xr-x 21 root root 4096 Apr 16 2002 ../
drwxrwxr-x 2 root root 4096 Apr 24 2002 ana/
drwxrwxrwx 1 root root 0 Mar 1 20:40 cdrom/
drwxrwxr-x 2 root root 4096 Mar 27 2001 disk/
drwxrwxrwx 1 root root 0 Mar 1 20:40 floppy/
drwx------ 1 root root 512 Mar 4 02:32 ftana/
drwx------ 1 root root 512 Mar 4 02:32 sharedana/
drwxrwxrwx 8 root root 8192 Jan 1 1970 windows/
[root@magicsrv /mnt]# chmod -R 777 sharedana
[root@magicsrv /mnt]# ls -la
total 25
drwxr-xr-x 9 root root 4096 Mar 1 20:29 ./
drwxr-xr-x 21 root root 4096 Apr 16 2002 ../
drwxrwxr-x 2 root root 4096 Apr 24 2002 ana/
drwxrwxrwx 1 root root 0 Mar 1 20:40 cdrom/
drwxrwxr-x 2 root root 4096 Mar 27 2001 disk/
drwxrwxrwx 1 root root 0 Mar 1 20:40 floppy/
drwx------ 1 root root 512 Mar 4 02:32 ftana/
drwx------ 1 root root 512 Mar 4 02:32 sharedana/
drwxrwxrwx 8 root root 8192 Jan 1 1970 windows/
[root@magicsrv /mnt]# chmod -R ugo+rw sharedana/
[root@magicsrv /mnt]# ls -la
total 25
drwxr-xr-x 9 root root 4096 Mar 1 20:29 ./
drwxr-xr-x 21 root root 4096 Apr 16 2002 ../
drwxrwxr-x 2 root root 4096 Apr 24 2002 ana/
drwxrwxrwx 1 root root 0 Mar 1 20:40 cdrom/
drwxrwxr-x 2 root root 4096 Mar 27 2001 disk/
drwxrwxrwx 1 root root 0 Mar 1 20:40 floppy/
drwx------ 1 root root 512 Mar 4 02:32 ftana/
drwx------ 1 root root 512 Mar 4 02:32 sharedana/
drwxrwxrwx 8 root root 8192 Jan 1 1970 windows/
[root@magicsrv /mnt]#
As you can see, even if I change the permissions to that directory, seems to have no effect...
Now it's working with the HTML file...
NOT without it.
I still get the 403 error if I don't have an index.html file.
If I do, it works ok.
I know index is working, just don't have sure if it is working for that dir. Any way I can check this?
Thanks for all your help!
[root@magicsrv /mnt]# smbmount //ana/shared sharedana -o uid=apache username=Ana Mota
Password:
[root@magicsrv /mnt]# ls -la
total 25
drwxr-xr-x 9 root root 4096 Mar 1 20:29 ./
drwxr-xr-x 21 root root 4096 Apr 16 2002 ../
drwxrwxr-x 2 root root 4096 Apr 24 2002 ana/
drwxrwxrwx 1 root root 0 Mar 1 20:40 cdrom/
drwxrwxr-x 2 root root 4096 Mar 27 2001 disk/
drwxrwxrwx 1 root root 0 Mar 1 20:40 floppy/
drwx------ 1 root root 512 Mar 4 02:32 ftana/
drwx------ 1 apache root 512 Mar 4 02:32 sharedana/
drwxrwxrwx 8 root root 8192 Jan 1 1970 windows/
[root@magicsrv /mnt]#
to enabled indexing in that specific dir, place a .htaccess file into it with the following line:
Options +Indexes