Dropbox Plugin for unRAID 5b11+ (updated)


Recommended Posts

Hi,

 

I have installed this successfully (apparently) but i notice that it in the dropbox share it replicates everything 81 times.

 

So for example if i sync from my laptop a file it will add it to dropbox but look like this:

 

Dropbox Data Directory: /mnt/disk1/Dropbox/

Dropbox Database Directory: /mnt/disk1/.dropbox

 

/mnt/disk1/Dropbox/Dropbox/Dropbox/Dropbox/Dropbox/Dropbox/Dropbox......81 times

 

Within each dropbox folder my file is there.

 

Any ideas?

 

Thanks

 

Sounds like you have a recursive directory.  ie. a directory with a symlink inside to itself.  I vaguely remember having this myself once, but I never did track down the root cause. 

 

 

This happened to me when I tried to set the /Dropbox/ and /.dropbox/ folders to a SNAP internally mounted hard drive.

 

I thought it might be due to the way the script sets permissions when creating folders. I don't think SNAP drives have permissions which can be set.

 

Is there any way to get dropbox working on SNAP mounted drives?

Link to comment
  • Replies 245
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

well i managed to do some testing and it happens when the data directory is called dropbox. I wanted to hide it as well, so i renamed it .DropboxData and it worked.

 

Dropbox Data Directory: /mnt/disk1/.DropboxData

Dropbox Database Directory: /mnt/disk1/.dropboxDB

 

I also noticed that the DB directory is recursive as well. It replicates itself over and over again. /mnt/disk1/.dropboxDB/.dropboxDB/.dropboxDB/.dropboxDB/.dropboxDB/.dropboxDB.... with all files associated.

 

Does anyone else see this issue?

 

Can I also ask that people give me examples our their directory setups so i can compare?

 

I did the suggestion of redoing it, By deleting all the plugin files, reinstalling, and changing it to .DropboxDB it asked me to resync and authorise the server at dropbox.com.

 

One last thing is i use the modified GUI found on this forum if that makes any difference?

 

 

Link to comment

well i managed to do some testing and it happens when the data directory is called dropbox. I wanted to hide it as well, so i renamed it .DropboxData and it worked.

 

Dropbox Data Directory: /mnt/disk1/.DropboxData

Dropbox Database Directory: /mnt/disk1/.dropboxDB

 

I also noticed that the DB directory is recursive as well. It replicates itself over and over again. /mnt/disk1/.dropboxDB/.dropboxDB/.dropboxDB/.dropboxDB/.dropboxDB/.dropboxDB.... with all files associated.

 

Does anyone else see this issue?

 

If you create the directories yourself you can get the plugin working. I got it working on a SNAP-mounted drive by creating the directories myself and bypassing the directory creation lines in the plugin

Link to comment
  • 2 weeks later...

Can it be i'm having some problems with the plugin stopping it before my array is offline?

I'm getting retrying unmounting disks retrying unmounting disks retrying umounting disks.... etc when i try to stop and turn off my unraid machine

It seems unraid is waiting for the addon to shut down...

 

Can you make it shut down before my array is taken offline?

Link to comment

Can it be i'm having some problems with the plugin stopping it before my array is offline?

I'm getting retrying unmounting disks retrying unmounting disks retrying umounting disks.... etc when i try to stop and turn off my unraid machine

It seems unraid is waiting for the addon to shut down...

 

Can you make it shut down before my array is taken offline?

 

What version of the plugin are you using?  I posted version 0.4 recently in which I made some changes specifically to handle how the plugins stops dropbox as I was also seeing this issue from time to time.  Please make sure you've grabbed a copy of v0.4 from the original post and test again.

Link to comment

Installed latest one, i wonder if it will be ok now

 

I had problems with this plugin because I overlooked how mac deals with file extension renaming. I thought i had renamed it to .plg but it stayed as .txt

 

I recall i was getting those errors when it was in this state. I only noticed when upon reboot it would never start automatically.

 

Thanks everyone else for the support, all working fine now.

Link to comment

Running 5.0-rc11

 

I can't access \\tower2\Dropbox from windows vista

I have my share settings set to Private, and one user with read/write permissions

(I am getting access denied)

I have all my shares set up the same way and can access all of my shares fine except for Dropbox

 

I just idownloaded dropbox-0.4-i468-1atv.plg and placed it in my flash\config\plugins

 

Everything seems to be running fine:

 

root@Tower2:~# /etc/rc.d/rc.dropbox status

Idle

 

sudo -u nobody HOME=/usr/local/dropbox /usr/local/sbin/dropbox.py start

Result = needed link

 

Following the link "this computer is already linked"

 

Location of the data files: /mnt/disk1/Dropbox

Location of Database Directory: /mnt/disk1/.dropbox

 

Python version

python --version

Python 2.6.6

 

One thing I may have done wrong was, I did not create the share called Dropbox, the installation process created the share.  should I have created the share myself prior to installing the dropbox plugin?

 

I did have to set the share to private and adjust the users from no access to read/write.

 

I rebooted both windows and unraid at the same time, which did not help.

 

If I go to http://tower2/Shares/Browse?dir=/mnt/user/Dropbox

I can see that Dropbox / cloud has sync'ed with /mnt/user/Dropbox

 

I am attaching the installation prompts and a syslog

 

Do I need to run new permissions again?

 

Thanks for any help on gaining read/write access to \\tower2\Dropbox

 

Albin

 

syslog_after_dropbox_plugin1.txt

drop_box_install_prompts1.txt

Link to comment

Location of the data files: /mnt/disk1/Dropbox

Location of Database Directory: /mnt/disk1/.dropbox

 

Albin, I'm trying to replicate the problem here.  Can you send me the output of ...

 

ls -la /mnt/disk1/Dropbox
ls -la /mnt/disk1/.dropbox

 

I'm not completely sure where the issue is yet, but I suspect it's permission based.  Did some tests here and noticed that on initial dropbox plugin installation but prior to starting dropbox, the above locations have these permissions:

 

drwxrwx---  2 nobody users        48 2013-02-07 23:42 .dropbox/

drwxrwx---  2 nobody users        48 2013-02-07 23:42 Dropbox/

 

Strangely after starting dropbox, they change to :

 

drwx------  3 nobody users        256 2013-02-07 23:53 .dropbox/

drwxrwx---  2 nobody users        48 2013-02-07 23:52 Dropbox/

 

This is not the plugin.  This is dropbox itself changing the permissions for .dropbox directory.  I need to test further, but it could be useful to see what your permissions are for these directories.

 

 

 

Regards,

overbyrn

Link to comment

Location of the data files: /mnt/disk1/Dropbox

Location of Database Directory: /mnt/disk1/.dropbox

 

Albin, I'm trying to replicate the problem here.  Can you send me the output of ...

 

I'm not completely sure where the issue is yet, but I suspect it's permission based.  Did some tests here and noticed that on initial dropbox plugin installation but prior to starting dropbox, the above locations have these permissions:

 

This is not the plugin.  This is dropbox itself changing the permissions for .dropbox directory.  I need to test further, but it could be useful to see what your permissions are for these directories.

 

 

Regards,

overbyrn

 

 

I hope the below is what you were looking for.  I first got the info when dropbox was idle, then I stopped dropbox and got the other info.  (I am not showing them in the order executed, rather in an order to help for visual comparison.  Does not look like there is any difference. 

 

Dropbox Status = IDLE:

ls -la /mnt/disk1/Dropbox

total 232

drwx------      7 nobody users    248    2013-02-07 15:16 ./

drwxrwxrwx 11 nobody users    312    2013-02-07 14:25 ../

-rw-r--r--        1 nobody users    29    2013-02-07 15:16 .dropbox

drwxr-xr-x      2 nobody users    48    2013-02-07 14:28 .dropbox.cache/

-rw-r--r--        1 nobody users 230783 2011-07-20 08:44 Getting\ Started.pdf

drwxr-xr-x      4 nobody users    264    2013-02-07 14:28 NBCC/

drwxr-xr-x      2 nobody users    72    2011-07-25 14:47 NBCC\ Video/

drwxr-xr-x      3 nobody users    128    2013-02-07 14:27 Photos/

drwxr-xr-x      2 nobody users    264    2013-02-07 14:27 Public/

 

Dropbox Status = Dropbox isn't running!

ls -la /mnt/disk1/Dropbox

total 232

drwx------      7 nobody users    248    2013-02-07 15:16 ./

drwxrwxrwx 11 nobody users    312    2013-02-07 14:25 ../

-rw-r--r--        1 nobody users    29    2013-02-07 15:16 .dropbox

drwxr-xr-x      2 nobody users    48    2013-02-07 14:28 .dropbox.cache/

-rw-r--r--        1 nobody users 230783 2011-07-20 08:44 Getting\ Started.pdf

drwxr-xr-x      4 nobody users    264    2013-02-07 14:28 NBCC/

drwxr-xr-x      2 nobody users    72    2011-07-25 14:47 NBCC\ Video/

drwxr-xr-x      3 nobody users    128    2013-02-07 14:27 Photos/

drwxr-xr-x      2 nobody users    264    2013-02-07 14:27 Public/

 

Dropbox Status = IDLE:

ls -la /mnt/disk1/.dropbox

total 416

drwx------      3 nobody users    464  2013-02-07 15:16 ./

drwxrwxrwx 11 nobody users    312  2013-02-07 14:25 ../

srw-------        1 nobody users      0    2013-02-07 15:16 command_socket=

-rw-------        1 nobody users  3072  2013-02-07 14:26 config.db

-rw-------        1 nobody users  12288 2013-02-07 15:16 config.dbx

-rw-r--r--        1 nobody users  6144  2013-02-07 14:27 deleted.dbx

-rw-r--r--        1 nobody users      4    2013-02-07 15:16 dropbox.pid

-rw-r--r--        1 nobody users  41984 2013-02-07 15:16 filecache.dbx

-rw-r--r--        1 nobody users    77    2013-02-07 15:16 host.db

-rw-r--r--        1 nobody users    209  2013-02-07 15:16 host.dbx

-rw-r--r--        1 nobody users    81    2013-02-07 14:26 hostkeys

srw-------      1 nobody users      0    2013-02-07 15:16 iface_socket=

drwxr-xr-x    2 nobody users    48    2013-02-07 14:26 l/

-rw-r--r--      1 nobody users  13312  2013-02-07 15:16 photo.dbx

-rw-r--r--      1 nobody users 316416 2013-02-07 14:28 sigstore.dbx

-rw-r--r--      1 nobody users    200    2013-02-07 15:16 unlink.db

 

 

Dropbox Status = Dropbox isn't running!

ls -la /mnt/disk1/.dropbox

total 416

drwx------      3 nobody users    464  2013-02-07 15:16 ./

drwxrwxrwx 11 nobody users    312  2013-02-07 14:25 ../

srw-------        1 nobody users      0    2013-02-07 15:16 command_socket=

-rw-------        1 nobody users  3072  2013-02-07 14:26 config.db

-rw-------        1 nobody users  12288 2013-02-07 15:16 config.dbx

-rw-r--r--        1 nobody users  6144  2013-02-07 14:27 deleted.dbx

-rw-r--r--        1 nobody users      4    2013-02-07 15:16 dropbox.pid

-rw-r--r--        1 nobody users  41984 2013-02-07 15:16 filecache.dbx

-rw-r--r--        1 nobody users    77    2013-02-07 15:16 host.db

-rw-r--r--        1 nobody users    209  2013-02-07 15:16 host.dbx

-rw-r--r--        1 nobody users    81    2013-02-07 14:26 hostkeys

srw-------      1 nobody users      0      2013-02-07 15:16 iface_socket=

drwxr-xr-x    2 nobody users    48    2013-02-07 14:26 l/

-rw-r--r--      1 nobody users  13312  2013-02-07 15:16 photo.dbx

-rw-r--r--      1 nobody users 316416 2013-02-07 14:28 sigstore.dbx

-rw-r--r--      1 nobody users    200    2013-02-07 15:16 unlink.db

 

Let me know if you need anything more, and thanks for looking into it.

 

Albin

Link to comment

I went through the following steps (in order):

[*]re-ran the "New Permissions" (waited for it to complete)

[*]stopped the dropbox plugin

[*]powered down Unraid

[*]brought up a dos prompt and ran "net use * /delete"

[*]powered down windows

[*]powered up windows

[*]powered up Unraid

[*]started the array and dropbox

[*]browsed to \\tower2\Dropbox

[*]entered my login credentials

 

and NOW I have read / write access to \\tower2\Dropbox

 

Just out of curiosity, at a telnet prompt I ran

ls -la /mnt/disk1/Dropbox
ls -la /mnt/disk1/.dropbox

 

total 232

drwxrwxrwx  7 nobody users    248      2013-02-08 13:20 ./

drwxrwxrwx 11 nobody users    312      2013-02-07 14:25 ../

-rw-rw-rw-    1 nobody users    29        2013-02-08 13:19 .dropbox

drwxrwxrwx  2 nobody users    48        2013-02-07 14:28 .dropbox.cache/

-rw-rw-rw-    1 nobody users    230783 2011-07-20 08:44 Getting\ Started1.pdf

drwxrwxrwx  4 nobody users    264      2013-02-07 14:28 NBCC/

drwxrwxrwx  2 nobody users    72        2011-07-25 14:47 NBCC\ Video/

drwxrwxrwx  3 nobody users    128      2013-02-07 14:27 Photos/

drwxrwxrwx  2 nobody users    264      2013-02-07 14:27 Public/

 

total 416

drwx------      3 nobody users    464    2013-02-08 13:21 ./

drwxrwxrwx 11 nobody users    312    2013-02-07 14:25 ../

srw-------        1 nobody users      0      2013-02-08 13:19 command_socket=

-rw-rw-rw-    1 nobody users  3072  2013-02-07 14:26 config.db

-rw-rw-rw-    1 nobody users  12288  2013-02-08 13:21 config.dbx

-rw-rw-rw-    1 nobody users  6144  2013-02-07 14:27 deleted.dbx

-rw-rw-rw-    1 nobody users      4      2013-02-08 13:19 dropbox.pid

-rw-rw-rw-    1 nobody users  41984  2013-02-08 13:21 filecache.dbx

-rw-r--r--        1 nobody users    77    2013-02-08 13:19 host.db

-rw-rw-rw-    1 nobody users    209    2013-02-08 13:19 host.dbx

-rw-rw-rw-    1 nobody users    81    2013-02-07 14:26 hostkeys

srw-------      1 nobody users      0      2013-02-08 13:19 iface_socket=

drwxrwxrwx  2 nobody users    48    2013-02-07 14:26 l/

-rw-rw-rw-    1 nobody users  13312  2013-02-08 13:21 photo.dbx

-rw-rw-rw-    1 nobody users 316416 2013-02-07 14:28 sigstore.dbx

-rw-r--r--      1 nobody users    200    2013-02-08 13:19 unlink.db

 

The only change I see is the renaming of "Started.pdf" to "Started1.pdf"

(that was to verify read write access)

 

Just thinking out loud here.... if the above is the same as before running "New Permissions" why do I now have read / write access to \\tower2\Dropbox , where as before I did not.

 

So it may be fixed, but I am not sure what part of the above actually fixed it.

Link to comment

I have dropbox running fine in /cache/appdata/dropbox.

 

however, I have noticed that there is a share published for dropbox as well, using all disks.

should I delete this share, or enable it on cache only, or just hide it.

 

Where is a) your dropbox data directory and b) your dropbox db directory?  The default installation location for the Dropbox Data location is /mnt/disk1, which under normal circumstances would show up as a regular share.  Many people choose to install to another location and you may have also as you mention /cache/appdata/dropbox but as you do not say if that is the data or database location, I can't advise further without knowing more. 

 

 

 

Regards,

overbyrn

Link to comment

I thought I'd gotten it working but after resetting the plugin to take account of a password change, I'm again getting infinitely recursive /Dropbox/ and /.dropbox/ folders.

 

I have tried on more than one occasion to reproduce this issue, but so far cannot.  I do not see how this happens.  I assume some action involving a shortcut or symlink is created which starts a recursive situation.  But on my setup I am not able to provoke this into happening. 

 

And you are seeing recursive directories within both the data and database locations yes?

 

For what it is worth, my dropbox config is below.  It's quite simple and seems to work for me.  My workflow is such that I tend to hardly ever reference files/dirs in the dropbox data location on my Unraid.  It tends to act as a local backup in case I lose access to the cloud version or my main Win7 PC copy.  However, that being said, I do from time to time drop files into the Unraid Dropbox data location and see them instantly update with the Win7 PC / Cloud.  I never have read/write permission errors, but then I my Unraid shares are left as open as possible.  That was one of the reasons for re-writing the plugin as the original version ran as root, preventing write access to files on the Unraid Dropbox data location. 

 

As I say, my setup is fairly unremarkable and I imagine generally typical of others who are using this plugin.  I write all this in case there's anything here which could act as a clue to tracking down the root cause of the recursive issue.

 

My Dropbox is setup as;

Dropbox Database Directory : /mnt/cache/services/dropbox

Dropbox Data Directory : /mnt/cache/Dropbox (as cache only user share)

 

As you can see, I don't use periods in the dropbox directory names.  For me, anything that's outside of core unraid data such as plugins, lives in /mnt/cache/services/.  Kept nicely away from the user shares.  My main Dropbox data location is a user share, but on the cache dir only, so essentially /mnt/cache/Dropbox and also visible as mnt/user/Dropbox.

 

 

Regards,

overbyrn

 

 

Link to comment

I would like to make a note that I get the recursive dropbox directories as well every time I re-do my dropbox plugin. I just delete the extra folder and it doesn't come back. It would be nice to know what causes it though. My dropdox is installed on my cache drive with the data pointed at /mnt/user/dropbox

 

Sent from my A510 using Tapatalk HD

Link to comment

I would like to make a note that I get the recursive dropbox directories as well every time I re-do my dropbox plugin. I just delete the extra folder and it doesn't come back. It would be nice to know what causes it though. My dropdox is installed on my cache drive with the data pointed at /mnt/user/dropbox

 

Sent from my A510 using Tapatalk HD

 

Useful.  The commonality being that you were both setting dropbox up at the time.  I'll focus on watching for it happen whilst installing fresh and/or relinking.

Link to comment
  • 2 weeks later...

AS mentioned earlier, i also get the recursive Dropbox folder, but i simply delete it and it never comes back until i reinstall the plugin.

 

Terminal shows the recursive dropbox folder as:

 

lrwxrwxrwx 1 root  root      18 2013-02-27 18:30 Dropbox -> /mnt/cache/Dropbox/

 

Where as all other files/folders look like:

 

drwxr-xr-x 1 nobody users    120 2013-02-27 18:31 Public/

Link to comment

AS mentioned earlier, i also get the recursive Dropbox folder, but i simply delete it and it never comes back until i reinstall the plugin.

 

/Reallly/ want to fnd time to look at this.

 

One of these days I'll be able to debug this issue as well as other ideas such as consolidate all my plugins to github, include a plugin up date function and a rewrite of each to harmonise code, put out a new still-in-dev version of openssh plugin and a ton of other things. 

 

Unfortunately life keeps getting in the way.  :-\

Link to comment
  • 2 weeks later...

ok quick question, im trying to use the dropbox plugin to only upload some pictures from unraid to dropbox, i see by default everything is downloaded from dropbox, this isnt really what i want as i have ton of other files in dropbox that i dont want replicated on unraid, so my question is can i force an upload only?

 

cheers.

Link to comment

ok quick question, im trying to use the dropbox plugin to only upload some pictures from unraid to dropbox, i see by default everything is downloaded from dropbox, this isnt really what i want as i have ton of other files in dropbox that i dont want replicated on unraid, so my question is can i force an upload only?

 

cheers.

 

I don't think i understand your definitions of upload/download, but the basic principle is that Dropbox will sync between all instances linked to your account.

 

You can choose (in preferences) what folders you would like to sync. It is called "selective sync". Can be found in the advanced tab. That way you choose what is synced to that particular instance, at a local level.

 

I'll check to see if you can do this in unRAID as obviously there is no preferences, but perhaps there is a config file somewhere.

 

 

**EDIT**

 

Looks like it is in the dropbox.py file:

http://buildcontext.com/blog/2012/dropbox-linux-ubuntu-ec2-linode-selective-sync

 

 

Selective Sync

Step 8: You will need to call the 'exclude add' command for each top level folder you don't want to sync, I'd suggest starting by excluding your biggest folder to save Dropbox and your server some work.

cd ~/Dropbox
~/utils/dropbox.py ls
-> Photos  Projects  Public  Server  Work

~/utils/dropbox.py exclude add Projects
~/utils/dropbox.py exclude add Photos
~/utils/dropbox.py exclude add Public
~/utils/dropbox.py exclude add Work
~/utils/dropbox.py ls
-> Server

 

Sadly this is about as far as my technical skills go, as i've had a look at the file but have no idea where it should go. Fortuntaely this i a very helpful and active community, so i'm sure someone else will be able to assist further, good luck!

 

Link to comment
Guest
This topic is now closed to further replies.