How to Mount Box on Ubuntu Linux

|

|

This tutorial provides instructions for mounting Box online storage on Ubuntu 20.04/18.04. Although Box doesn’t offer a native Linux client, users can use WebDAV protocol for secure access to their content. The tutorial offers two mounting methods: through Ubuntu’s File Manager and via Command Line, with detailed steps for each method.

This brief tutorial shows students and new users how to mount Box online storage on Ubuntu 20.04 | 18.04.

Box.com offers online storages service for businesses and individuals. Box service helps keep your files safe with cloud-native security capabilities like granular access controls, watermarking, and classification.

As of this writing, Box did not offer any native Linux client that works with their platform. However, a secure WebDAV protocol allows you to mount your online storage easily via HTTPS.

Once mounted, you can securely access your Box content via WebDAV protocol, find every file you need, edit like you would any local file, and save it automatically to the cloud. 

To get started with mounting Box files on Ubuntu, follow the steps below:

Mount Box via File Manager

The File Manager is the quickest way to mount your Box storage on an Ubuntu desktop.

Ubuntu file manager has built-in support to access remote servers over multiple protocols such as FTP, NFS, Samba, SSH, AppleTalk, and WebDAV.

To mount your Box storage, open the Ubuntu file manager and click on the menu + Other Locations

Then type in the Box WebDAV address:

davs://dav.box.com/dav

After that, click Connect.

That should prompt you to enter your Box account username and password to sign in.

Login and begin managing your Box content.

You can add the Box mount to your favorite by right-clicking the Box link on the left and selecting Add to Favorite.

That’s now to mount Box on Ubuntu file explorer.

Mount Box via Command Line

If you’re running a Linux server and want to mount your Box storage via the terminal, use the steps below:

First, run the commands below to install the required packages

sudo apt install davfs2

When prompted, select Yes if you want unprivileged users to mount WebDAV resources.

Create your Box mount point on the server. This is the location you’ll access your Box content.

mkdir ~/Box

We will create it in our home folder and call it Box.

Box does not support file locks. To get this to work, you’ll need to turn off file locks in the davfs2 configuration file located at /etc/davfs2/davfs2.conf.

Run the commands below to open the config file.

sudo nano /etc/davfs2/davfs2.conf

Then turn off the lock file by editing the file and changing the highlighted value to 0.

 trust_server_cert
# clientcert
# secrets         ~/.davfs2/secrets # user config file only
# ask_auth        1
  use_locks       0
# lock_owner      <user-name>
# lock_timeout    1800              # seconds
# lock_refresh    60                # seco

Save the ext.

After that, run the commands below to add your account to the davfs2 group.

sudo usermod -a -G davfs2 $USER

You may have to log out and back in or reboot the machine after running the commands above.

Next, edit the /etc/fstab file and add a Box mount point entry.

sudo nano /etc/fstab

Then add the line below to the end of the file and save.

https://dav.box.com/dav /home/richard/Box davfs rw,user,noauto 0 0

Save the file and exit.

After adding the entry, run the commands below to mount your Box content.

mount Box

You’ll be prompted to enter your Box account details.

richard@ubuntu2004:~$ mount Box
Please enter the username to authenticate with server
https://dav.box.com/dav or hit enter for none.
  Username: richard@gmail.com
Please enter the password to authenticate user rworloma@gmail.com with server
https://dav.box.com/dav or hit enter for none.
  Password:  

Now go to ~/Box to get your content.

That’s it!

Conclusion:

This post showed you how to mount Box content on Ubuntu. If you find any error above, use the form below to report it.

Like this:



5 responses to “How to Mount Box on Ubuntu Linux”

  1. Ritesh Avatar
    Ritesh

    I am getting the following error after trying to mount Box (I am entering the correct credentials):
    Could not authenticate to server: rejected Basic challenge

  2. Thomas Avatar
    Thomas

    I am getting the error, Could not authenticate to server: rejected Basic challenge

    I don’t believe WebDAV is any longer supported.

  3. Chris Avatar
    Chris

    Thanks for the helpful tutorial. This worked for me using Pop-Os 22.04

  4. Noirrit Chandra Avatar
    Noirrit Chandra

    Can I somehow tweak the commands to sync files seamlessly like Dropbox?

  5. K. Smit Avatar
    K. Smit

    Thx for this great post, very complete.
    It was just what I was looking for.
    Unfortunately, Box has stopped supporting DAV.

Leave a Reply to Noirrit Chandra Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.