Mounting Box in Linux using davfs2 - research-technologies/hull_provisioning GitHub Wiki

Instructions to Install and configure davfs2 on Ubuntu for box

Ref: https://uisapp2.iu.edu/confluence-prd/display/SOICKB/Using+Box+under+Linux

Section Mounting Box (davfs2)
page printed to usingBoxUnderLinux-mountWithDavfs.pdf

Install davfs2

sudo apt-get install davfs2

Create a folder to mount box

mkdir /home/username/box 

Add the group davfs2 to the user

sudo usermod -a -G davfs2 username

login and logout for this to be recognized

Add the "use_locks 0" configuration option to /etc/davfs2/davfs2.conf.

sudo vim /etc/davfs2/davfs2.conf
# search for the line use_locks (likely commented). Copy the line, remove the comment and set the value to 0 
# save the file

Add the following entry to /etc/fstab that looks like this

sudo vim /etc/fstab
https://dav.box.com/dav/ /home/username/box davfs rw,user,noauto 

Copy the /etc/davfs2 directory to .davfs2 in your home directory.

sudo cp -r /etc/davfs2 ~/.davfs2
sudo chown -R username:username ~/.davfs2

Create a file called 'secrets' in ~/.davfs2/

vim ~/.davfs2/secrets

Add just one line to the file of the format

https://dav.box.com/dav box_user_email box_password

Note: For the box_password, do not use the sso password of the account, but create an external password.
Ref: https://kb.iu.edu/d/bccp for instructions

Page printed to CreateExternalPassword.pdf

Set the permissions on the secrets folder

chmod 600 ~/.davfs2/secrets

Mount the box folder

mount /home/username/box 

To unmount:

fusermount -u /home/username/box