top of page

Mounting Box as Local Folder on Linux/Ubuntu 18.04

I just got this to work and wanted to throw down some notes really fast. Thanks to my sources listed at the end for all the help.

Basically, Box.com (online cloud storage) does support local hosting for Linux OS so you have to do some janky stuff if you want to be able to access your cloud storage locally. These steps worked for me, they may or may not work for you. I attribute the bulk of this process to [1] and [2], thank you!

  1. Install davfs2 by entering: sudo apt install davfs2

  2. Allow davfs2 to be used by all users, not just root

  3. Navigate to the root directory, then to /etc/fstab (fstab is a text file)

  4. Open fstab using the command (sudo is necessary otherwise you can't edit the file!): sudo emacs fstab

  5. Add these lines to the fstab file at the end:

  6. # BOX WebDAV

  7. https://dav.box.com/dav /home/yourusername/net/box davfs user,rw,noauto 0 0

  8. You will need to create the /net/box path in your home/yourusername directory. Use the command mkdir to do so!

  9. Next add yourself to the davfs2 group by typing: sudo gpasswd -a yourusername davfs2

  10. Go to Box.com and add an external password under Account Settings/Account. You will need to do this if you usually use a single sign on to access your drive on Box.com.

  11. Now navigate to ~/.davfs2/secrets (which is also a text file)

  12. Again open secrets using as root to edit the file: sudo emacs secrets

  13. Add the line: /home/yourusername/net/box <email> <password>

  14. Fill in your own email and password for your Box.com account

  15. Here's where I diverged from [1] to mount the Box.com folder to your local drive. Instead of doing what he suggested, I entered the following command based on suggestions from [2]: sudo mount -t davfs https://dav.box.com/dav ~/net/box

Once I entered the command in step 12, I saw a new folder pop up on my desktop and voila! All my files were inside.

I hope that helps!

Sources:

[1] http://www.math.cmu.edu/~gautam/sj/blog/20150807-box-webdav.html

[2] https://askubuntu.com/questions/403785/mount-your-box-account-or-sync-a-folder-with-it


bottom of page