WebDAV question


The goal:
To have a mapped drive which a user can drop a folder full of photos onto. In the WebDAV folder is a php photogallery app ( http://editkid.com/EUWDPCpix/ ) which automatically creates galleries out of folders full of photos. The setup should emulate the system that apple offers with it’s iDisk system (which is essentially WebDAV anyway) whereby the iDisk has a ‘pictures’ subfolder, and anything dropped in there gets added into the gallery.

The problem:
Anything created over WebDAV has crazy permissions and isn’t accessible by the php. If the php is placed there over WebDAV it doesn’t even run. I can’t set the permissions over ssh or ftp, I can’t edit the .htaccess files in the DAV folder and I can’t sudo over ssh. This system could be an absolutely idiot-proof web photo gallery system if I can get it to work, so any help would be much appreciated.


One trick, make sure you run your webserver is running as dhapache (uncheck the run as CGI under your Web control panel. This means that the web server is actually running scripts as the user dhapache which just happens to be the owner of the WebDAV files. The scripts will then be able to modify things. This of course might break some of your CGI type apps, but the trick there, add a .htaccess to the directories where the scripts that need CGI access are located. The .htaccess file should contain
AddType php-cgi .php
which then runs the php scripts as CGI.

Good luck and hope this helps.