Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to use a TurnKey LAMP server as a sandbox web-development environment for a project with components in php and binary executables. My host machine is OS 10.6. I want to use AFP to serve a directory from my host machine so that I can make changes and quickly test them (i.e. a sandbox). I did a lot of research to get the virtual machine (running Ubuntu) to mount an AFP share and was finally successful, but I have run into configuration problems with Apache that cause it to raise a 403 error for the shared directory. I just need some help getting Apache configured to serve this directory.

Here are the steps to reproduce the situation:

  1. Download and install the TurnKey LAMP server.
  2. While you wait, download afpfs-ng.
  3. Also while you wait, set up an additional afp share on the mac with an easy username and password.
  4. Run the following commands on the shell of the lamp vm.
    1. apt-get install build-essential libfuse-dev libreadline-dev libgcrypt11-dev libgmp3-dev libgmp3c2 libgmpxx4ldbl
    2. modprobe fuse
    3. copy the afp tarball to the vm
    4. tar -xf afpfs-ng-0.8.1.tar.bz2
    5. cd afpfs-ng-0.8.1
    6. ./configure
    7. make
    8. make install
    9. cd /var/www
    10. mkdir shared_via_afp
    11. mount_afp 'afp://user:-@host_computer/share-name' shared_via_afp

Trying to access this directory from a web browser just raises a 403. What next?

Here are the resources I used to get afp to work:
http://sites.google.com/site/alexthepuffin/home
http://guide.ubuntuforums.org/showthread.php?t=1011312&page=2
http://stackoverflow.org/wiki/Mount_an_AFP_share_from_Linux
http://sourceforge.net/apps/mediawiki/fuse/index.php?title=FAQ

share|improve this question
    
I've gotta ask why you're using AFP rather than NFS if you intend to share to a *nix box? afpfs-ng is a FUSE plugin, so I'm guessing that the Apache daemon doesn't have access to FUSE'd mountpoint. I'm not sure how, but you'd have to get the Apache account to do the FUSE mount. (...Or use NFS...) –  gWaldo Sep 15 '10 at 20:54
add comment

2 Answers

I've gotta ask why you're using AFP rather than NFS if you intend to share to a *nix box?

afpfs-ng is a FUSE plugin, so I'm guessing that the Apache daemon doesn't have access to FUSE'd mountpoint. I'm not sure how, but you'd have to get the Apache account to do the FUSE mount.

(...Or use NFS...)

share|improve this answer
    
I did start with nfs but wasn't successful with that either. I don't think I ever got my mac to properly share via nfs. I'll look into that again. Tips? –  Jonathan Swinney Sep 15 '10 at 22:09
add comment
up vote 0 down vote accepted

I solved the problem with samba. I don't know if I just didn't do the right searches back in September or if it wasn't an option but setting up a samba server on the LAMP TurnKey virtual appliance is easy:

root@lamp /$ apt-get update
root@lamp /$ apt-get install samba
root@lamp /$ apt-get install webmin-samba

http://www.turnkeylinux.org/forum/support/20100330/add-samba-server-turnkey-joomla

share|improve this answer
    
Hmm... I think I should have read my question. I forgot that the problem was the 403, not the sharing. –  Jonathan Swinney May 4 '11 at 14:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.