Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Finder Command-K vs. mount_webdav.

I have a WebDAV server (an iPhone running Olive Toast's "Files" app) that I can mount via Finder by hitting Command-K and then entering the server address (in this case, "http://10.0.1.4:8080") mounting as a guest (so, no username or password entry needed). The server then appears as "10.0.1.4" under the Shared group in the Finder sidebar, and the path shows as "/Volumes/10.0.1.4".

What I can't figure out is the correct Terminal/Shell command to perform the same function and get the same result, preferably without any user input required.

Any suggestions are welcome. Thanks.

MacBook Pro 17" (Early 2011), Mac OS X (10.6.7), iPhone 4 32GB / iPad 64GB 3G

Posted on Apr 3, 2011 9:59 AM

Reply
17 replies

Jan 10, 2013 8:20 PM in response to randy_harris

SInce you are using a shell script, why not just create a symbolic link to the mounted webdav?


    ...
    rm -f /Volume/WEBDAV
    if [ $? -eq 0 ]; then
          echo 
          echo "About to mount to LOCAL Webdav..."
          osascript -e ' mount volume "http://LOCALIP:WEBDAVPORT" '
          ln -s /path/to/local/webdav.mount.point /Volume/WEBDAV
    else
          echo "About to mount to ETERNAL Webdav..."
          osascript -e ' mount volume "http://EXTERNALIP:WEBDAVPORT" '
          ln -s /path/to/remote/webdav.mount.point /Volume/WEBDAV
    fi


Now you have a constant name at a contant location. The location could be anywhere you like, I just exampled using /Volumes/WEBDAV


If you want to actually give this your own mount point then you need to look at not using osascript and start looking at the Unix mount command. See "man mount_webdav"


mkdir -p /Volumes/WEBDAV
mount -t webdav http://LOCALIP:WEBDAVPORT /Volumes/WEBDAV


However, I'm unsure if stored credentials will be used (I suspect not 😟)


If there is a way to do this via Applescript (which is basically all the osascript was doing), I do not know it. I'm not saying a way does not exist, I'm just saying my Applescript skills stink 🙂


One other idea. Use the Unix ""mount -t webdav command once for local and once for remote. Once you have it mounted where you want it, use the Finder to create a Mac OS X "Alias". Finder -> File -> Make Alias (rename the alias as desired). This should incorporate all the connection information (I hope). You should now have a local "Alias" and a "Remote" alias. When you double click on the Alias, it should hopefully mount the webdav as it was when the Alias was created. If authenticaion is needed the Alias should handle that. NOTE: Never tried this with webdav, and never tried this with using the Unix "mount -t webdav" command. So I'm not sure it will work or not.


Message was edited by: BobHarris

Jan 14, 2013 3:58 PM in response to BobHarris

This is exactly what I want to be able to do, but it doesn't work for me...



mkdir -p /Volumes/WEBDAV
mount -t webdav http://LOCALIP:WEBDAVPORT /Volumes/WEBDAV



I get no error messages, it just doesn't mount the WebDav to the share.


Update: when I run the "mount -t webdav..." line nothing happens, but if I key Up Arrow and Enter on about the 7th or 10th time it does work. WTH?

Finder Command-K vs. mount_webdav.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.