Anyone have a MobileMe account and wondered if you can access the iDisk from a mount command in your Linux environment? It’s handy for backing up your data and general file sharing.
This simple step by step process will allow you to gain read and write access to your MobileMe user account’s iDisk drive space. The first pre-cursor you need to fulfill is that you need the davfs (on debian/ubuntu flavors just run: apt-get install davfs2) package installed.
Next we’re going to create a mount point that will be used as a point of reference for the iDisk drive.
sudo mkdir /mnt/idisk |
Using the root user account, modify your /etc/fstab file by adding the following at the bottom. Just change the {account_name} section below:
https://idisk.mac.com/{account_name} /mnt/idisk davfs rw,noauto,user 0 0
Now that you’ve completed the modification of the mount. Let’s run a test.
mydev:/mnt# mount /mnt/idisk Please enter the username to authenticate with server https://idisk.mac.com/{acccount_name} or hit enter for none. Username: {acccount_name} Please enter the password to authenticate {acccount_name} with server https://idisk.me.com/{acccount_name} or hit enter for none. Password: mydev:/mnt# ls -al /mnt/idisk total 11 drwxr-xr-x 15 root root 256 2009-08-13 08:11 . drwxr-xr-x 4 root root 4096 2009-08-13 07:59 .. drwxr-xr-x 2 root root 68 2009-06-16 14:33 Backup drwxr-xr-x 2 root root 36 2009-06-16 14:33 Documents drwxr-xr-x 2 root root 68 2009-06-17 07:14 Groups drwxr-xr-x 5 root root 132 2009-07-02 09:11 iPhone Development drwxr-xr-x 5 root root 100 2009-06-17 07:48 Library drwx------ 2 root root 36 2009-08-13 08:11 lost+found drwxr-xr-x 2 root root 36 2009-06-16 14:33 Movies drwxr-xr-x 2 root root 36 2009-06-16 14:33 Music drwxr-xr-x 2 root root 36 2009-06-16 14:33 Pictures drwxr-xr-x 2 root root 36 2009-06-17 07:49 Public drwxr-xr-x 2 root root 36 2009-06-16 14:33 Sites drwxr-xr-x 3 root root 88 2008-07-10 01:11 Software drwxr-xr-x 3 root root 52 2009-06-17 07:53 Web |
That’s great isn’t it? Now the only trouble is it keeps on prompting you for your username and password. In my situation I want this automated. Luckily for us, davfs has a mechanism built into it for managing this. It’s located in the /etc/davfs2/secrets file. So as the root user run the following commands.
mydev:/# umount /mnt/idisk mydev:/# echo "https://idisk.mac.com/{account_name} {account_name} {account_password}" >> /etc/davfs2/secrets mydev:/# mount /mnt/idisk mydev:/# ls -al /mnt/idisk total 11 drwxr-xr-x 15 root root 256 2009-08-13 08:11 . drwxr-xr-x 4 root root 4096 2009-08-13 07:59 .. drwxr-xr-x 2 root root 68 2009-06-16 14:33 Backup drwxr-xr-x 2 root root 36 2009-06-16 14:33 Documents drwxr-xr-x 2 root root 68 2009-06-17 07:14 Groups drwxr-xr-x 5 root root 132 2009-07-02 09:11 iPhone Development drwxr-xr-x 5 root root 100 2009-06-17 07:48 Library drwx------ 2 root root 36 2009-08-13 08:11 lost+found drwxr-xr-x 2 root root 36 2009-06-16 14:33 Movies drwxr-xr-x 2 root root 36 2009-06-16 14:33 Music drwxr-xr-x 2 root root 36 2009-06-16 14:33 Pictures drwxr-xr-x 2 root root 36 2009-06-17 07:49 Public drwxr-xr-x 2 root root 36 2009-06-16 14:33 Sites drwxr-xr-x 3 root root 88 2008-07-10 01:11 Software drwxr-xr-x 3 root root 52 2009-06-17 07:53 Web mydev:/# umount /mnt/idisk |
And that is it! No more prompting for the username and password. Pretty simple implementation and we’re off to the races.
EDIT NOTES: Thanks DaveDaveDave for the comment, I changed the https://idisk.me.com to the new and functional https://idisk.mac.com
I'm a software developer focused on all facets of enterprise solutions and technologies. Currently, I'm enjoying developing iPhone applications at night while spending much of my day working on Java, .Net and database implementations.

#1 by Bill Kendrick on August 17th, 2009
THanks for the interesting post. I’ve been looking for a way to use my mobile me account for a while on Linux. This is a useful addition to what I already use, which is a service called SMEStorage.com. Using this service I can then use a nice Firefox plug-in which gives me a lot more control on what I can do with MobileME. Having the mount point makes this even better !
#2 by Adam Christensen on August 31st, 2009
Thanks for the post!
I do have one question though: How do you make this usable by people other than root?
I would like to be able to write to the idisk without having to be root.
Cheers
#3 by Chris Danielson on August 31st, 2009
Adam,
Thanks for the comment. If you are having an issue with the “mount: only root can do that”. Then you’ll need to look at the following article on how to handle adjusting your system to allow non-root users to mount http://ubuntuforums.org/showthread.php?t=878387.
As well, you could sudo the command as needed.
Kind Regards,
Chris
#4 by Szczepan on September 18th, 2009
Is there a way to:
- let users mount THEIR OWN remote webdav accounts anywhere under THEIR OWN home directories…
- …WITHOUT the administrator having to add a line to /etc/fstab for each and every one of the HUNDREDS webdav accounts that users might use…
- …and WITHOUT compromising system security by granting users special rights like wheel or suid on mount programs?
#5 by Chris Danielson on September 18th, 2009
Szczepan,
Have a look at the following link (Look for the alias Shadow and the follow-up by ivomans)
http://ubuntuforums.org/archive/index.php/t-77935.html
It appears they have solved this issue.
Regards,
Chris
#6 by Szczepan on September 18th, 2009
It appears they haven’t. In fact, their solution totally fails _all_three_ requirements I outlined.
#7 by Chris Danielson on September 18th, 2009
Thanks for the response. You are correct, the fact that you have a hurdle within your requirements of having mount without having any special rights means that my article above is a no-go for you.
The only solution I think that would work for you is a WebDav Python script or simple WebDav client that you can find. That seems to be the best possible solution considering the security requirements.
Regards,
Chris
#8 by Szczepan on September 19th, 2009
Unfortunately that is not an option. For productivity reasons we absolutely need to mount in order to be able to browse shares and edit files directly with software that doesn’t support (or half-supports, or even actively fends against) gvfs or similar mechanisms. We’d rather endure curlftpfs’ excruciating slowness than be unable to user-mount.
#9 by MaDmAtT on September 24th, 2009
Thank you for your post.
I would like to force accept certificates when Using mount.davfs. What is your experience on it.
Thank you.
#10 by Leaman Crews on December 31st, 2009
I remember I used this method in Ubuntu 9.04, and it worked well. Having done a clean install of 9.10, I searched for how to do this and found your guide. However, I get the following error after running the “mount /mnt/idisk” command:
SSL negotiation failed: SSL alert received: Error in protocol version
But, on a lark, I decided to try and just use the “Connect to Server” option in the GUI and it worked!
My settings are:
Service type: Secure WebDAV (HTTPS)
Server: idisk.me.com
Folder:
User Name:
I left everything else blank, clicked Connect, and was prompted for my password. Fast and easy! May I emphasize the fast part…iDisk in the Finder on Mac OS X is still slower than it should be in Leopard/Snow Leopard, but faster than in previous versions.
Anyway, hope this works for everyone else, as it’s much better than having to muck around with /etc/fstab and going to the terminal every time to mount a dang WebDAV server.
#11 by Leaman Crews on December 31st, 2009
In my comment above, the Folder and User Name fields should be your MobileMe username. I guess they were stripped out because I used HTML-style brackets to enclose them.
#12 by DaveDaveDave on March 4th, 2010
For quite some time now I’ve only been able to mount my idisk with an unsecure link – as in “http://idisk.me.com/redactedname”. – note that this isn’t using https and is basically completely unsecure, with my mobile me password being exposed to who knows who along the way, along with all the other data on my idisk.
Whenever I tried to mount, I’d get the old “SSL negotiation failed: SSL alert received: Error in protocol version” error.
The solution? Use idisk.mac.com instead of idisk.me.com. I have no idea why, but using “https://idisk.mac.com/redacteduser” works in my fstab.
Hope this helps someone…
Dave
I FINALLY stumbled into the solution
#13 by matt on March 8th, 2010
DaveDaveDave: Had the exact same problem. Your post solved it for me. Thanks!
#14 by George on September 3rd, 2010
Hi,
really useful post but my problem is that after I upload any file to idisk, I can see it from me.com for some seconds and after a while is deleted! I don’t know why? Any suggestion?
Thanks a lot!
#15 by David on October 28th, 2010
THANKS!!! that last comment saved me
EDIT NOTES: Thanks DaveDaveDave for the comment, I changed the https://idisk.me.com to the new and functional https://idisk.mac.com
it only works form the url idisk.mac.com for me! who knew.
#16 by Jesper Wallin on November 12th, 2010
Awesome! This saves me tons of time trying to figure out this myself.
How does the system acts if MobileMe (or my connection) randomly goes down? Does it hang the entire system or automagically unmount it?
again, thanks for a lovely guide!
#17 by Jon on February 24th, 2011
if your running a recent version of Gnome, you can mount your idisk right from gnome. Go to places –> Connect to Server –> Secure WebDAV. The use
Server: idisk.mac.com
Port: blank
Folder: username
User Name: username
#18 by Sagi on July 13th, 2011
This forum needed sakinhg up and youve just done that. Great post!
#19 by Jon Pellant on April 28th, 2012
Actually if you are using Nautilus (gnome/ubuntu filemanager), all you need to do is select Go>>Location… and type:
davs://@idisk.me.com/
(e.g., for me: davs://w1jp@idisk.me.com/w1jp)
skål,
Jon
w1jp
#20 by Jon Pellant on April 28th, 2012
some of the words of my previous comments were stripped out.
The format is:
davs://your_id@idisk.me.com/your_id