Dropbox Plugin for unRAID 5b11+


Recommended Posts

Dropbox Plugin

 

The plugin can be download from the Unraid Plugin Wiki Page: http://lime-technology.com/wiki/index.php?title=UnRAID_Plugins

 

  • Reboot or run "installplg /boot/config/plugins/dropbox-0.1-i468-1atv.plg"
  • Settings can be configured under the Settings Tab.

 

When you first start the plugin you will be shown a URL on the settings screen to activate unRAID on your dropbox account

 

Known Issues

 

  • Dropbox cannot be installed to /mnt/user/[somepath].

 

Thanks

SeeDrs

Link to comment
  • Replies 99
  • Created
  • Last Reply

Top Posters In This Topic

Weird, mine won't seem to start up.  I checked permissions, and even tried to launch it from putty, it says it's running and not running one after another with no explanation...  It does spin up a process called dropbox each time you run it, but I can't see the public URL etc.  it reports that it's not running.. Are there logs I can look at somewhere? Can't find any.  Thanks for the hard work on this and other plugins.

Link to comment

Weird, mine won't seem to start up.  I checked permissions, and even tried to launch it from putty, it says it's running and not running one after another with no explanation...  It does spin up a process called dropbox each time you run it, but I can't see the public URL etc.  it reports that it's not running.. Are there logs I can look at somewhere? Can't find any.  Thanks for the hard work on this and other plugins.

 

What is the path that you are saving the dropbotdb and dropbox dir too?  I seen your issue when saving to anything under /mnt/user/.

 

Also, can you post the contents of /var/log/plugins/dropbox so i can take a look at the install commands and their results.

Link to comment

I have a few questions and please forgive me if its been asked before.

 

1. What about security for your unRaid server? any ports that needed to open?

 

2. I take it you still log into your dropbox account at dropbox.com

 

3. Does this still cost $$$ for use of more that 2 gig limit of data usage? or it redirects to your unRaid server for local on-line storage at no cost to you.

 

Thanks

 

JM

Link to comment

My problem is, after reboot, it prompted me to hit the activation url again.  I knew this might be an issue because I already had Dropbox running (just wouldn't launch dropbox.py from GO script; would have to launch it manually) and linked it to my existing dropboxdb

 

Capture.JPG

 

This is how I was previously launching from my GO script:

 

# Start Dropbox
echo 100000 > /proc/sys/fs/inotify/max_user_watches
ln -s /mnt/cache/.dropboxdb /root/.dropbox
ln -s /mnt/cache/.Dropbox /root/Dropbox
ln -s /boot/custom/packages/.dropbox-dist /root/.dropbox-dist
python /boot/scripts/dropbox.py start

 

I previously found that I would get that linking error if I didn't properly symlink the dropbox db folder.  Also note, even tho I setup your plugin with my existing config before I started the plugin, this same thing happened.  Now that's happening on every reboot.  

 

BTW, how did you get dropbox.py start to work?  Everytime I launched it from my GO script it said I needed to install the proprietary daemon (which you can see, I had).  After it failed, I could immediately launch it from a shell with no problems.  I figured it had something to do with a path problem or something.  

 

Other than this issue, it works great!  Thx again!  

 

Here's the plugin LOG:

 

Start: October 22, 2011 02:29:14 AM

CMD: rm -rf /root/.dropbox 
Results: 

CMD: rm -rf /root/Dropbox 
Results: 

CMD: ln -s /mnt/cache/.dropboxdb /root/.dropbox 
Results: 

CMD: ln -s /mnt/cache/.Dropbox /root/Dropbox 
Results: 

CMD: HOME=/root; /usr/local/sbin/dropbox.py start; 
Results: Starting Dropbox...Done!

End: October 22, 2011 02:29:18 AM

Link to comment

My problem is, after reboot, it prompted me to hit the activation url again.  I knew this might be an issue because I already had Dropbox running (just wouldn't launch dropbox.py from GO script; would have to launch it manually) and linked it to my existing dropboxdb

 

Capture.JPG

 

This is how I was previously launching from my GO script:

 

# Start Dropbox
echo 100000 > /proc/sys/fs/inotify/max_user_watches
ln -s /mnt/cache/.dropboxdb /root/.dropbox
ln -s /mnt/cache/.Dropbox /root/Dropbox
ln -s /boot/custom/packages/.dropbox-dist /root/.dropbox-dist
python /boot/scripts/dropbox.py start

 

I previously found that I would get that linking error if I didn't properly symlink the dropbox db folder.  Also note, even tho I setup your plugin with my existing config before I started the plugin, this same thing happened.  Now that's happening on every reboot. 

 

BTW, how did you get dropbox.py start to work?  Everytime I launched it from my GO script it said I needed to install the proprietary daemon (which you can see, I had).  After it failed, I could immediately launch it from a shell with no problems.  I figured it had something to do with a path problem or something. 

 

Other than this issue, it works great!  Thx again! 

 

Here's the plugin LOG:

 

Start: October 22, 2011 02:29:14 AM

CMD: rm -rf /root/.dropbox 
Results: 

CMD: rm -rf /root/Dropbox 
Results: 

CMD: ln -s /mnt/cache/.dropboxdb /root/.dropbox 
Results: 

CMD: ln -s /mnt/cache/.Dropbox /root/Dropbox 
Results: 

CMD: HOME=/root; /usr/local/sbin/dropbox.py start; 
Results: Starting Dropbox...Done!

Based on the status it looks like it gets stuck starting, e
End: October 22, 2011 02:29:18 AM

 

 

 

I got dropbyx.py working by setting  "HOME=/root" before  I ran dropbox.py. Here is how I do it in the plugin  "HOME=/root; /pathtodropboxpy/dropbox.py status". So it set home right before I run dropbox.py every time in the plugin to be safe.

 

Can you point your data directory and dropboxdb directory to new locations. ie. /mnt/cache/.Dropboxnew and /mnt/cache/.dropboxdbnew and let the plugin create a new instance.  See if asks for you to re-activate, if it does then everything seems to be working fine and for some reason the old instance you has installed is causing issue.

 

Another things that I am not doing in the plugin is making a symlink for dropbox-dist.  The plugin will reinstall that every reboot into memory. from the dropbox.tar file in /boot/plugins. This could also be an issue, but when I tested on my side dropbox came up fine after rebooting even though the dropbox-dist was reinstalled.

 

Also I'd comment out your dropbox commands in the go script, reboot, then install the plugin.

Link to comment

My current version - UNRAID5 - BLD12A

-----------------------------------------

 

I loaded the drop box plug, activated the account:

I see unraid is now activated on dropbox so all ok, so far.

 

Problem

 

I went to Windows to check the Dropbox Dir - which is there but  I cannot access it as it says :

 

"You dont have permission to access"

 

Any ideas how to cure this problem

 

Thanks

Joe

Link to comment

My current version - UNRAID5 - BLD12A

-----------------------------------------

 

I loaded the drop box plug, activated the account:

I see unraid is now activated on dropbox so all ok, so far.

 

Problem

 

I went to Windows to check the Dropbox Dir - which is there but  I cannot access it as it says :

 

"You dont have permission to access"

 

Any ideas how to cure this problem

 

Thanks

Joe

 

That is because root owns the files.  You can run the New Permissions script in the util menu to fix the permiossions, but any new files created will still be owned by root. This could possubly be solved by setting the the umask at bootup to say that everyone has rw to files/directories when they are created.

Link to comment

Seedrs,

 

I am not very familar with Linux but managed to do :

 

sudo chmod  777 -R  /mnt/disk1/Dropbox 

 

This changed all the files to read /write etc and I now can see

and access my files in the windows DropBox dir.

 

The point you raised on setting a r/w mask makes sense but I am not sure where to put the command and what it would look like

 

Thanks for your help

Joe

 

Link to comment

Weird, mine won't seem to start up.  I checked permissions, and even tried to launch it from putty, it says it's running and not running one after another with no explanation...  It does spin up a process called dropbox each time you run it, but I can't see the public URL etc.  it reports that it's not running.. Are there logs I can look at somewhere? Can't find any.  Thanks for the hard work on this and other plugins.

 

What is the path that you are saving the dropbotdb and dropbox dir too?  I seen your issue when saving to anything under /mnt/user/.

 

Also, can you post the contents of /var/log/plugins/dropbox so i can take a look at the install commands and their results.

 

Exactly what I did /mnt/user/Dropbox/files and /mnt/user/Dropbox/.dropbox I'll try to pick a specific disk /mnt/disk20/Dropbox/files, etc.

 

If I still have a problem I'll provide the other detail... thanks again.

 

UPDATE: changing the directory to a disk instead of user share worked perfectly.  Great stuff, thanks!

Link to comment
  • 4 weeks later...
  • 4 months later...

I copied the plg file to the pluginsdirectory and started the command as specified in the forum:

 

installplg /boot/config/plugins/dropbox-0.1-i468-1atv.plg

 

Unfortunately dropbox does not install, it gives me the following error:

 

 

installing plugin: dropbox-0.1-i468-1atv

file /boot/packages/dropbox.tgz: downloading from http://www.dropbox.com/download/?plat=lnx.x86 ... ERROR: cannot verify www.dropbox.com's certificate, issued by `/C=US/O=Thawte, Inc./CN=Thawte SSL CA':

  Unable to locally verify the issuer's authority.

To connect to www.dropbox.com insecurely, use `--no-check-certificate'.

bad download, deleting

root@Tower:~# installplg /boot/config/plugins/dropbox-0.1-i468-1atv.plg

installing plugin: dropbox-0.1-i468-1atv

file /boot/packages/dropbox.tgz: downloading from http://www.dropbox.com/download/?plat=lnx.x86 ... ERROR: cannot verify www.dropbox.com's certificate, issued by `/C=US/O=Thawte, Inc./CN=Thawte SSL CA':

  Unable to locally verify the issuer's authority.

To connect to www.dropbox.com insecurely, use `--no-check-certificate'.

bad download, deleting

 

Looks like something on dropbox's side, but is there a way to cirumvent this ?

Link to comment

I copied the plg file to the pluginsdirectory and started the command as specified in the forum:

 

installplg /boot/config/plugins/dropbox-0.1-i468-1atv.plg

 

Unfortunately dropbox does not install, it gives me the following error:

 

 

installing plugin: dropbox-0.1-i468-1atv

file /boot/packages/dropbox.tgz: downloading from http://www.dropbox.com/download/?plat=lnx.x86 ... ERROR: cannot verify www.dropbox.com's certificate, issued by `/C=US/O=Thawte, Inc./CN=Thawte SSL CA':

  Unable to locally verify the issuer's authority.

To connect to www.dropbox.com insecurely, use `--no-check-certificate'.

bad download, deleting

root@Tower:~# installplg /boot/config/plugins/dropbox-0.1-i468-1atv.plg

installing plugin: dropbox-0.1-i468-1atv

file /boot/packages/dropbox.tgz: downloading from http://www.dropbox.com/download/?plat=lnx.x86 ... ERROR: cannot verify www.dropbox.com's certificate, issued by `/C=US/O=Thawte, Inc./CN=Thawte SSL CA':

  Unable to locally verify the issuer's authority.

To connect to www.dropbox.com insecurely, use `--no-check-certificate'.

bad download, deleting

 

Looks like something on dropbox's side, but is there a way to cirumvent this ?

 

I change line 13 of the plugin file to

<URL>http://www.dropbox.com/download/?plat=lnx.x86 --no-check-certificate</URL>

 

And line 23 to

<URL>http://www.dropbox.com/download?dl=packages/dropbox.py --no-check-certificate</URL>

 

And it seemed to work fine. I attached the file if you want to use it.

 

For what its worth, I don't really know what the implications of

 --no-check-certificate

is, so use it at your own risk.

Link to comment

I copied the plg file to the pluginsdirectory and started the command as specified in the forum:

 

installplg /boot/config/plugins/dropbox-0.1-i468-1atv.plg

 

Unfortunately dropbox does not install, it gives me the following error:

 

 

installing plugin: dropbox-0.1-i468-1atv

file /boot/packages/dropbox.tgz: downloading from http://www.dropbox.com/download/?plat=lnx.x86 ... ERROR: cannot verify www.dropbox.com's certificate, issued by `/C=US/O=Thawte, Inc./CN=Thawte SSL CA':

  Unable to locally verify the issuer's authority.

To connect to www.dropbox.com insecurely, use `--no-check-certificate'.

bad download, deleting

root@Tower:~# installplg /boot/config/plugins/dropbox-0.1-i468-1atv.plg

installing plugin: dropbox-0.1-i468-1atv

file /boot/packages/dropbox.tgz: downloading from http://www.dropbox.com/download/?plat=lnx.x86 ... ERROR: cannot verify www.dropbox.com's certificate, issued by `/C=US/O=Thawte, Inc./CN=Thawte SSL CA':

  Unable to locally verify the issuer's authority.

To connect to www.dropbox.com insecurely, use `--no-check-certificate'.

bad download, deleting

 

Looks like something on dropbox's side, but is there a way to cirumvent this ?

 

I change line 13 of the plugin file to

<URL>http://www.dropbox.com/download/?plat=lnx.x86 --no-check-certificate</URL>

 

And line 23 to

<URL>http://www.dropbox.com/download?dl=packages/dropbox.py --no-check-certificate</URL>

 

And it seemed to work fine. I attached the file if you want to use it.

 

For what its worth, I don't really know what the implications of

 --no-check-certificate

is, so use it at your own risk.

 

thank you.

 

having the same problem, but now it works.

 

THanks.

Link to comment

Dropbox Plugin

 

The plugin can be download from the Unraid Plugin Wiki Page: http://lime-technology.com/wiki/index.php?title=UnRAID_Plugins

 

SeeDrs, thanks for the plugin.  Been running it for months but have never been happy with the permissions issue that all new files are created as root.  I didn't want to mess with the default umask and wondered if it wasn't possible to run as user nobody like some of the other plugins do.

 

I think I've managed to get it to run as nobody and so far from my early tests, new files put into Dropbox are assigned nobody:users and I'm able to browse to the Dropbox share from a Windows PC and open the file - something which I'm unable to do when they're root:root

 

I've not amended your plugin as to be honest for all the things I run on top of UnRAID such as Sab, Sick, Couch, I tend to roll my own after seeing what others have done.  I'm guessing you could adapt the plugin fairly easily.

 

Key point to note is that I run everything from my cache drive.  I don't have anything in /root which is used by dropbox.  Not sure how this'll hold up for others who don't run on a cache drive, but then you mention in your first post that it's known not to work in /mnt/user, so I figure perhaps the majority of others using this plugin also use a cache disk as Dropbox store.

 

I started with a fresh v5.0b12a system not running dropbox or having any previous dropbox related files and folders.  (I kept the basic plugin folder structure whilst testing)

 

Download dropbox.py

mkdir -p /boot/config/plugins/dropbox
cd /boot/config/plugins/dropbox
wget --no-check-certificate http://www.dropbox.com/download?dl=packages/dropbox.py

 

Test running the dropbox python script:

HOME=/mnt/cache; sudo -u nobody /boot/config/plugins/dropbox/dropbox.py status
Dropbox isn't running!

 

Run the dropbox python script to start and download the engine;

cd /mnt/cache
HOME=/mnt/cache; sudo -u nobody /boot/config/plugins/dropbox/dropbox.py start -i

Starting Dropbox...
Dropbox is the easiest way to share and store your files online. Want to learn more? Head to http://www.dropbox.com/

In order to use Dropbox, you must download the proprietary daemon.
Note: python-gpgme is not installed, we will not be able to verify binary signatures. [y/n] Y

Downloading Dropbox... 100%
Unpacking Dropbox... 100%
Dropbox isn't running!
Done!

 

Two folders are created: ".dropbox" containing the user DB and ".dropbox-dist" with the Dropbox daemon and supporting application files.  Both have been created in /mnt/cache with nobody:users as owner:group;

root@Eddie:~# pwd
/mnt/cache
root@Eddie:~# ls -la
total 8
drwxrwx--- 17 nobody     users  440 2012-04-05 09:23 ./
drwxr-xr-x 14 root       root     0 2012-04-04 14:21 ../
drwx------  3 nobody     users  256 2012-04-05 09:23 .dropbox/
drwxr-xr-x  4 nobody     users 2352 2012-04-05 09:23 .dropbox-dist/

 

Now we need to link the new copy of dropbox to our account;

HOME=/mnt/cache; sudo -u nobody /boot/config/plugins/dropbox/dropbox.py start

To link this computer to a dropbox account, visit the following url:
https://www.dropbox.com/cli_link?host_id=c165fe82898edf01972c1f5dae6fb8de&cl=en_US

 

Paste the link your are provided into a browser, login and the account is linked.  Give it a few seconds and check your folder structure.  A new folder "Dropbox" should be created at the same location (eg. /mnt/cache").  Check the ownership;

root@Eddie:~# pwd
/mnt/cache
root@Eddie:~# ls -la
total 8
drwxrwx--- 17 nobody     users  440 2012-04-05 09:32 ./
drwxr-xr-x 14 root       root     0 2012-04-04 14:21 ../
drwx------  3 nobody     users  400 2012-04-05 09:32 .dropbox/
drwxr-xr-x  4 nobody     users 2352 2012-04-05 09:23 .dropbox-dist/
drwx------  5 nobody     users  272 2012-04-05 09:32 Dropbox/

 

As you can see, it also has owner:group of nobody:users and all files inside are the same and I am able to paste files from a linked Windows PC to my dropbox and they appear with the correct permissions on my Dropbox folder on UnRAID.

 

So I think there is not much to modify for the plugin.  I did not copy "dropbox.py" to /usr/local/sbin as the default for that file at that location becomes root:root and then the sudo -u nobody fails as it cannot execute dropbox.py.  I cheated and ran it directly from /boot/config/plugins/dropbox, but I guess you could always change the ownership in the plugin for just that file and keep it at /usr/local/sbin.

 

Then I think all you will need to do is replace entries in the plugin where you have ;

("HOME=/root; /usr/local/sbin/dropbox.py start;")

 

with

("HOME=/mnt/cache; sudo -u nobody /boot/config/plugins/dropbox/dropbox.py start;"

 

I suppose since it looks like you can set HOME as anything, then it could be set in the .cfg file and dropbox could run from pretty much anywhere in the ramFS?

 

 

Hope the above helps someone.

 

 

Regards,

RJ

Link to comment

 

Hi overbyrn,

 

I was just about to figure out how to access dropbox folder from file share access, and you just provide a clear solution. i did try what you said and can confirm that it works(your step is foolproof). thanks.

 

if i restart my server, would that mean i have to do this all over again? could you update the plg files to include the changes that you made?

 

Thanks.

Link to comment

 

Hi overbyrn,

 

I was just about to figure out how to access dropbox folder from file share access, and you just provide a clear solution. i did try what you said and can confirm that it works(your step is foolproof). thanks.

 

if i restart my server, would that mean i have to do this all over again? could you update the plg files to include the changes that you made?

 

Thanks.

Glad it helped.

 

On the subject of things surviving a reboot - I think you’ll be ok providing most of the critical stuff resides on your cache drive or some other permanent storage. 

 

If like in my previous post you have the three key directories - ".dropbox" (your unique DB files), ".dropbox-dist" (generic dropbox application files) and "Dropbox" (your sync'd folders) all on a cache drive, then after a reboot you should only need to issue the command;

 

HOME=/mnt/cache; sudo -u nobody /boot/config/plugins/dropbox/dropbox.py start

and dropbox daemon will start.

 

On my machine, I setup a cache only share for Dropbox so that the UnRAID mover script doesn't interfere with the directory "/mnt/cache/Dropbox" and try to copy it over to my array disks.  The other two of course are fine as they begin with a period so the mover ignores them.  I realise this setup isn't for everyone but all I can say is it works for me and I'm happy to have fixed the permissions problem.

 

If I get a bit of time I'll do some more checking as I'm a bit unsure what will happen if the standard plugin is allowed to run after a reboot but on top of my version of how I've configured dropbox.  I might try and modify the plugin, though no promises!

 

 

Link to comment

hi overbyrn,

 

in your original post, you did mention to replace ("HOME=/root; /usr/local/sbin/dropbox.py start;") in the plg file. i guess i missed that.

 

anyway, i would like to set the /mnt/cache/Dropbox folder to /mnt/usr/Dropbox, so that when i make changes to my Dropbox, the changes are made to the cache folder. at 3.40, the changes will be sync by mover to disk1. im not really sure what kind of changes mover made. is it rsync and delete or it just move files from cache folder to disk1 folder.

 

i would like to have my dropbox folder protected in my array while maintaining minimum access to array drives so that my array drives can spun down.

 

thanks.

Link to comment

only gotya of storing on the cache drive and then having it moved to the array - files will not get deleted....

 

I have my dropbox dir at /mnt/users/Dropbox

and data dir at /mnt/cache/.dropbox

 

and my drives spin down all the time....

 

on the user share I do limit the dropboox files to just 1 drive.....

 

Myk

 

Link to comment

only gotya of storing on the cache drive and then having it moved to the array - files will not get deleted....

 

I have my dropbox dir at /mnt/users/Dropbox

and data dir at /mnt/cache/.dropbox

 

and my drives spin down all the time....

 

on the user share I do limit the dropboox files to just 1 drive.....

 

Myk

So what you're saying is that chances are unless you've got something being sync'd, the Dropbox daemon doesn't access /mnt/user/Dropbox unless it has to, thus allowing the array drive to spindown. 

 

Good to know.

 

Hmm, quick question: where's your ./dropbox-dist directory?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.