[WebDAV] Mounting Box.com directories

Guides written by the community, for the community, and only guides!

[WebDAV] Mounting Box.com directories

Postby slycat » Fri Mar 09, 2012 5:10 pm

With cloud storage services on the rise such as Dropbox and SparkleShare, online storage of content is becoming simplified. However, with the exception of the Dropbox CLI, these services are geared towards desktop environments. Also, with a Dropbox account you can get only 2gb with a free account (up to 8gb if you recruit about 24 friends). Box is another cloud service offering 5gb for new sign-ups free. BUT if you catch them during a promotion you can get more(last month, android users who sign up get 50gb).

Like the other services, Box only has GUIs for Windows and Mac, currently. Luckily, the cloud storage is on WebDAV filesystems. This is how you can get your plug to mount these internet directories:

First, install davfs2, already in the repo
$this->bbcode_second_pass_code('', 'pacman -Sy davfs2')
There may be some dependencies to install to so say "Y" to all of them. For a service like Box, echo the following line with your accounts username or email and password
$this->bbcode_second_pass_code('', 'echo “https://www.box.com/dav user password” >> /etc/davfs2/secrets')
Next, pick a location on where to mount your web directory (can be anywhere but I chose this)
$this->bbcode_second_pass_code('', 'mkdir /mnt/Box-cloud')
Lastly, echo this line to your fstab and then mount (change uid,gid to users,groups you are comfortable with)
$this->bbcode_second_pass_code('', 'echo "https://www.box.com/dav /mnt/Box-cloud davfs defaults,uid=username,gid=groupname 0 0" >> /etc/fstab
mount -a')
EDIT: if there are issues with fstab handling the mounting you can forego the previous step and add this line to /etc/rc.local
$this->bbcode_second_pass_code('', 'mount.davfs https://www.box.com/dav /mnt/Box-cloud')
And that's it! Your Box account is now a mounted folder on your plug. When copying files/folders to or from this directory the process may be slow as it must communicate with the remote server for indexing prior to actual up/download.

Proven sites/directories (directory location):

Notes:
*If you get an "Input/output error", echo this
$this->bbcode_second_pass_code('', 'echo "use_locks 0" >> /etc/davfs2/davfs2.conf')
*There is a delay in beginning the upload sequence to allow for multiple directory changes BEFORE they actually start to transfer, making indexing faster for batch uploads. The default is 10 seconds and works well when I batched 400MB in 5 cp -r commands. If you don't plan on batching you can set this to 0 or, if you have a slower connection, can set this greater by adding this to /etc/davfs2/davfs2.conf
$this->bbcode_second_pass_code('', 'delay_upload #')
Last edited by slycat on Tue Mar 13, 2012 6:08 pm, edited 2 times in total.
Pogoplug Pro w/ Wireless User -> decomm.
Cubox-i4pro User
4TB eSATA HDD (8g/3700+ Sw/Storage)
Kodi / Transmission / Minidlna / Samba / Batch-audio-conversions / Lighttpd
------------------------------
Rollback Machine - Thanks to impatt
slycat
 
Posts: 169
Joined: Wed Feb 09, 2011 3:07 am
Location: Miami, FL

Re: [WebDAV] Mounting Box.com directories

Postby WarheadsSE » Fri Mar 09, 2012 5:21 pm

Nice.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: [WebDAV] Mounting Box.com directories

Postby bonelifer » Sun Mar 11, 2012 8:48 pm

When I restarted my box it hung with the fstab entry, so I went ahead and am just mounting with an executable bash file.

nano /bin/box
Paste this code into the box file
$this->bbcode_second_pass_code('', '
mount -t davfs https://www.box.net/dav /mnt/Box-cloud
')

Then make the box file executable:
chmod +x /bin/box
bonelifer
 
Posts: 11
Joined: Thu Jan 26, 2012 10:30 pm

Re: [WebDAV] Mounting Box.com directories

Postby bonelifer » Sun Mar 11, 2012 9:17 pm

This method also works with http://www.4shared.com webdav service.

Replace "https://www.box.net/dav" with "https://webdav.4shared.com"

It maybe my own perception, but 4shared seemed a little snappier to my actions, ie deletion/creation of files showing up more immediately.

Thanks slycat.
bonelifer
 
Posts: 11
Joined: Thu Jan 26, 2012 10:30 pm

Re: [WebDAV] Mounting Box.com directories

Postby slycat » Mon Mar 12, 2012 12:20 am

$this->bbcode_second_pass_quote('bonelifer', 'W')hen I restarted my box it hung with the fstab entry, so I went ahead and am just mounting with an executable bash file.
$this->bbcode_second_pass_code('', '
mount -t davfs https://www.box.net/dav /mnt/Box-cloud
')

I had the same issue after a reboot, so I had done the same thing you had but put that snippet of code into /etc/rc.local . This way on any reboot the web-dir is mounted. Thanks for sharing, thought I might be the only one with the issue. I'll re-write the first post.
Pogoplug Pro w/ Wireless User -> decomm.
Cubox-i4pro User
4TB eSATA HDD (8g/3700+ Sw/Storage)
Kodi / Transmission / Minidlna / Samba / Batch-audio-conversions / Lighttpd
------------------------------
Rollback Machine - Thanks to impatt
slycat
 
Posts: 169
Joined: Wed Feb 09, 2011 3:07 am
Location: Miami, FL

Re: [WebDAV] Mounting Box.com directories

Postby Philoo » Tue Mar 13, 2012 2:43 pm

hmm looks like www.box.net/dav is permanently redirected and that causes grief to my nautilus.
I'd suggest using www.box.com/dav instead.
Philoo
 
Posts: 102
Joined: Wed Aug 10, 2011 9:20 pm

Re: [WebDAV] Mounting Box.com directories

Postby mopeyjoe » Sun Dec 09, 2012 8:09 am

Has anyone else had issues with /dev/random and the like? I get an error about having a lack of entropy. I found one workaround involving me destroying and recreating those files each reboot... There has to be another way.
mopeyjoe
 
Posts: 21
Joined: Sat Mar 10, 2012 5:05 pm

Re: [WebDAV] Mounting Box.com directories

Postby WarheadsSE » Sun Dec 09, 2012 4:13 pm

Without common features of larger boards, random is much harder to come by on these small embedded devices.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: [WebDAV] Mounting Box.com directories

Postby pepedog » Sun Dec 09, 2012 8:23 pm

Anyone tried haveged as a soloution for entropy?
https://wiki.archlinux.org/index.php/Haveged
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: [WebDAV] Mounting Box.com directories

Postby mopeyjoe » Sun Dec 09, 2012 10:03 pm

$this->bbcode_second_pass_quote('WarheadsSE', 'W')ithout common features of larger boards, random is much harder to come by on these small embedded devices.


I am able to make it work by re-creating /dev/random OR chmoding it to 666. I would appear that the issue is the default permissions?

I may be doing something bad by 666'ing these files. :|
mopeyjoe
 
Posts: 21
Joined: Sat Mar 10, 2012 5:05 pm

Next

Return to Community Guides

Who is online

Users browsing this forum: No registered users and 7 guests