cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Learn more about how Connie, a member of the Community, uses Dropbox here!

Dropbox files & folders

Get in sync with the Dropbox Community. Our members can answer all your questions on Dropbox files and folders. Join a discussion or start your own today.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dropbox client warns me that it'll stop syncing in Nov, why?

Re: regression ?

Здравко
Super Collaborator | Level 20

 I already solved the problem using a simple script. If somebody want, could check it.

#!/bin/bash
##############################################################################
#                    Workaround for Dropbox daemon
#                    -----------------------------
# Verified on Dropbox v63.4.107
# Just make it executable (if need, using
#   $ chmod a+x fix_dropbox
# ) and run it.
# Author: Здравко
#   www.dropboxforum.com/t5/user/viewprofilepage/user-id/422790
##############################################################################

# Figure out the target places.
USR_HOME=`dirname ~/.local`
USR_LOCAL="$USR_HOME/.local"
USR_LOCAL_BIN="$USR_LOCAL/bin"
USR_LOCAL_LIB="$USR_LOCAL/lib"
DRB_REPLACEMENT="$USR_LOCAL_BIN/dropbox"
DRB_FIX_LIB="$USR_LOCAL_LIB/libdropbox_ext4.so"
USR_PROFILE="$USR_HOME/.profile"

##############################################################################
# Precheck and fix up some prerequisites.

# Ensure target directories are on their place.
if [[ ! -d $USR_LOCAL_BIN ]]
then
  echo "The Directory \"$USR_LOCAL_BIN\" doesn't exist, going to create it."
  mkdir -p $USR_LOCAL_BIN
  if [[ $? -ne 0 || ! -d $USR_LOCAL_BIN ]]
  then
    echo "Directory \"$USR_LOCAL_BIN\" creation fail! Exit."
    exit 1
  fi
fi
if [[ ! -d $USR_LOCAL_LIB ]]
then
  echo "The Directory \"$USR_LOCAL_LIB\" doesn't exist, going to create it."
  mkdir -p $USR_LOCAL_LIB
  if [[ $? -ne 0 || ! -d $USR_LOCAL_LIB ]]
  then
    echo "Directory \"$USR_LOCAL_LIB\" creation fail! Exit."
    exit 1
  fi
fi

# Ensure backup for any existing files.
if [[ -e $DRB_REPLACEMENT ]]
then
  if [[ -f $DRB_REPLACEMENT ]]
  then
    echo "\"$DRB_REPLACEMENT\" already exist, going to back it up."
    mv --backup=t -T $DRB_REPLACEMENT "${DRB_REPLACEMENT}.backup"
    if [[ $? -ne 0 || -e $DRB_REPLACEMENT ]]
    then
      echo "Error backing up \"$DRB_REPLACEMENT\" file! Exit."
      exit 1
    fi
  else
    echo "$DRB_REPLACEMENT is not regular file! Exit."
    exit 1
  fi
fi
if [[ -e $DRB_FIX_LIB ]]
then
  if [[ -f $DRB_FIX_LIB ]]
  then
    echo "\"$DRB_FIX_LIB\" already exist, going to back it up."
    mv --backup=t -T $DRB_FIX_LIB "${DRB_FIX_LIB}.backup"
    if [[ $? -ne 0 || -e $DRB_FIX_LIB ]]
    then
      echo "Error backing up \"$DRB_FIX_LIB\" file! Exit."
      exit 1
    fi
  else
    echo "$DRB_FIX_LIB is not regular file! Exit."
    exit 1
  fi
fi

# Ensure writing permissions.
if [[ ! -w $USR_LOCAL_BIN || ! -x $USR_LOCAL_BIN ]]
then
  chmod u+rwx $USR_LOCAL_BIN
  if [[ $? -ne 0 ]]
  then
    echo "The Directory \"$USR_LOCAL_BIN\" is inaccessible! Exit."
    exit 1
  fi
fi
if [[ ! -w $USR_LOCAL_LIB || ! -x $USR_LOCAL_LIB ]]
then
  chmod u+rwx $USR_LOCAL_LIB
  if [[ $? -ne 0 ]]
  then
    echo "The Directory \"$USR_LOCAL_LIB\" is inaccessible! Exit."
    exit 1
  fi
fi

##############################################################################
# Generate actual workaround components.

# Fixer - source and building.
read -r -d '' DRB_FIX_SRC << EndOfSrc
// Functions replacements
#define _GNU_SOURCE

#include <stdlib.h>
#include <sys/vfs.h>
#include <linux/magic.h>
#include <dlfcn.h>
#include <sys/statvfs.h>
#include <stdarg.h>

static int (*orig_statfs)(const char *path, struct statfs *buf) = NULL;
static int (*orig_statfs64)(const char *path, struct statfs64 *buf) = NULL;
static int (*orig_open64)(const char *pathname, int flags, ...) = NULL;

int statfs(const char *path, struct statfs *buf) {
  if (orig_statfs == NULL) {
    orig_statfs = dlsym(RTLD_NEXT, "statfs");
  }
  register int retval = orig_statfs(path, buf);
  if (retval == 0) {
    buf->f_type = EXT4_SUPER_MAGIC;
  }
  return retval;
}
 
int statfs64(const char *path, struct statfs64 *buf) {
  if (orig_statfs64 == NULL) {
    orig_statfs64 = dlsym(RTLD_NEXT, "statfs64");
  }
  register int retval = orig_statfs64(path, buf);
  if (retval == 0) {
    buf->f_type = EXT4_SUPER_MAGIC;
  }
  return retval;
}

int open64(const char *pathname, int flags, ...) {
  if (orig_open64 == NULL) {
    orig_open64 = dlsym(RTLD_NEXT, "open64");
  }
  register const char *p0 = "/proc/filesystems", *p1 = pathname;
  while(*p0 && *p1 && *p0 == *p1) ++p0, ++p1;
  if (*p0 == '\0' && *p1 == '\0') {
    return -1;
  }
  va_list arg;
  va_start(arg, flags);
  mode_t mode = va_arg (arg, int);
  va_end(arg);
  return orig_open64(pathname, flags, mode);
}
EndOfSrc
echo "$DRB_FIX_SRC" | gcc -shared -fPIC -ldl -xc -o $DRB_FIX_LIB -
if [[ $? -ne 0 ]]
then
  echo "Error building \"$DRB_FIX_LIB\"! Exit."
  exit 2
fi
echo "\"$DRB_FIX_LIB\" - build and ready."

# Wrapper generating.
echo "#!/bin/bash" > $DRB_REPLACEMENT
echo "sleep 10" >> $DRB_REPLACEMENT
echo "/usr/bin/dropbox stop" >> $DRB_REPLACEMENT
declare -p | grep "declare -x LD_PRELOAD" > /dev/null
if [[ $? -ne 0 ]]
then
echo "export LD_PRELOAD=$DRB_FIX_LIB" >> $DRB_REPLACEMENT
else echo "LD_PRELOAD=$DRB_FIX_LIB:\$LD_PRELOAD" >> $DRB_REPLACEMENT
fi echo "/usr/bin/dropbox \$@" >> $DRB_REPLACEMENT chmod a+x $DRB_REPLACEMENT echo "\"$DRB_REPLACEMENT\" - generated." # Environment check and fixup (if need). ( IFS=: for a in $PATH do if [[ "$a" == "$USR_LOCAL_BIN" ]] then exit 0 elif [[ "$a" == "/usr/bin" ]] then break fi done exit 1 ) result=$? echo "" echo "" if [[ $result -ne 0 ]] then echo "" >> $USR_PROFILE echo "" >> $USR_PROFILE echo "# Add $USR_LOCAL_BIN to \$PATH environment variable." >> $USR_PROFILE echo "# This addition is dedicated for Dropbox Workaround." >> $USR_PROFILE echo "# Remove theses lines when they are no more needed." >> $USR_PROFILE echo "PATH=\"$USR_LOCAL_BIN:\$PATH\"" >> $USR_PROFILE echo "" >> $USR_PROFILE echo "Your Dropbox is almost patched. You have to logout and login" echo " (or on Your opinion - restart), so all changes to take effect." echo "After Your next account login:" fi echo "Your Dropbox is already patched. Just start it from desktop GUI or type:" echo "\$ dropbox start" echo "in console."

Just copy the code in text file named "fix_dropbox" (for example), make it executable using "$ chmod a+x fix_dropbox" and finally run it. Could be need (depending on Your current setup) to logout and login again. That's it.

Good luck for anyone affected.

Edit: Little improvement, affecting proper detection of cases without LD_PRELOAD preset for some environments.

Re: Dropbox client warns me that it'll stop syncing in Nov, why?

msartori
New member | Level 2

What is the actual requirement? xattr? if so why not check if xattr is supported instead of checking the filesystem? I keep my home file system under a zfs dataset which supports xattr, I have no intention of creating a zvol formated with ext4 just to mount the Dropbox folder on my system. I was a paying client, but since dropbox stop supporting my configuration I withdrew my subscription.

Re: regression ?

Martin L.33
Helpful | Level 5

@Здравко:

Thanks. Can you describe in a few words what the script actually does? How does it work?

Re: regression ?

Здравко
Super Collaborator | Level 20

Hi @Martin L.33,

I think the comments, inside the script, are explanatory enough. May be, the main differencies, regarding previous proposals, are that this is in fact installer (self contained) and instalation target is privite user space, wich let regular user (without root access) use it. The chosen directory tree is standard, so probably (if You already have used private installers, like 'pip' for example) it already exist. Of course, on Your opinion, You can change this at any time, according Your needs. Everything else is already deeply discussed here in the current thread.

Re: regression ?

f_u_n_k_dolphin
New member | Level 2

This is really a stupid idea. I used to keep my Dropbox folder on an external SD card (formatted exFAT), which I could easily swap between my Mac and Win$$ machine, but hey, Dropbox decided it's in my "best interest" not to support this simple configuration anymore. Thank you very much Dropbox. How stupid is that? Yeah, so much for paying for Dropbox... exFAT is a POS, but it's the only easily portable option between Mac and Windows. Since when exFAT is not a "mainstream" FS, Dropbox?!?!

Re: regression ?

thx1138
Explorer | Level 4

I had my linux home partition formatted with ext3 for compatibility with a dualboot windows 7 (no encryption). Stupid enough, just mounting the ext3 partition as ext4 (set in /etc/fstab) did the trick for Dropbox.

That only enables donward compatible features of ext4, but I don't care.

Re: regression ?

weidenrinde
New member | Level 2

The script from Здравко  has (at least for me) a minor error. Replace ...

echo "LD_PRELOAD=$DRB_FIX_LIB:\$LD_PRELOAD" >> $DRB_REPLACEMENT

... by:

echo "export LD_PRELOAD=$DRB_FIX_LIB:\$LD_PRELOAD" >> $DRB_REPLACEMENT

With this fix it works for me, but not without. To my knowledge, LD_PRELOAD needs to be exported to be used in called programms.

Apart from that the hack is amazing. Thanks.

Re: regression ?

Здравко
Super Collaborator | Level 20

Hi @weidenrinde,

Ok. If this is need for You, this could be the case for other people too. So thank You for share this.

Genegaly Your statement isn't true. (see: https://linux.die.net/man/1/bash in part "Environment") In short: All preset environment variables are exported automatically by default. (as such - including LD_PRELOAD!) So 'export' keyword should be meaningless here.

I think possible reasons could be strange bash build or environment set. In my case (Ubuntu 18.4.1 using bash 4.4.18-2ubuntu1) there isn't any problems. Can You share Your case? Could be useful for other people using similar setup too. Thanks in advance.

Re: Desktop app notification: Move dropbox location dropbox stops synchronizing in November

marianocabezon
Helpful | Level 5

unhappily, as we succesfully used DB for many years and invited many people, we are trying other cloud storage to keep having the files accesible from Linux and Windows.

to have the files so, is an importat issue to keep both OS, but we slowly realize we use Windows almost never...

Debian headless started failing in November, but ext4 filesystem?

mrmoosehead
New member | Level 2

bn.BUILD_KEY: Dropbox
bn.VERSION: 59.4.93
bn.DROPBOXEXT_VERSION: failed
bn.is_frozen: True
machine_id: 33f46101-703a-10c5-fc6f-a4f451840101
pid: 2377
ppid: 1
ppid exe: failed
uid: 1000
user_info: pwd.struct_passwd(pw_name='adrian', pw_passwd='x', pw_uid=1000, pw_gid=1000, pw_gecos='Adrian Hall,,,', pw_dir='/home/adrian',
pw_shell='/bin/bash')
effective_user_info: pwd.struct_passwd(pw_name='adrian', pw_passwd='x', pw_uid=1000, pw_gid=1000, pw_gecos='Adrian Hall,,,', pw_dir='/hom
e/adrian', pw_shell='/bin/bash')
euid: 1000
gid: 1000
egid: 1000
group_info: grp.struct_group(gr_name='adrian', gr_passwd='x', gr_gid=1000, gr_mem=[])
effective_group_info: grp.struct_group(gr_name='adrian', gr_passwd='x', gr_gid=1000, gr_mem=[])
LD_LIBRARY_PATH: None
cwd: '/home/adrian'
real_path='/home/adrian'
mode=0o40755 uid=1000 gid=1000
parent mode=0o40755 uid=0 gid=0
HOME: '/home/adrian'
appdata: '/home/adrian/.dropbox/instance1'
real_path='/home/adrian/.dropbox/instance1'
mode=0o40700 uid=1000 gid=1000
parent mode=0o40700 uid=1000 gid=1000
dropbox_path: '/home/adrian/Dropbox'
real_path='/home/adrian/Dropbox'
mode=0o40755 uid=1000 gid=1000
parent mode=0o40755 uid=1000 gid=1000
sys_executable: '/home/adrian/.dropbox-dist/dropbox-lnx.x86_64-59.4.93/dropbox'
real_path='/home/adrian/.dropbox-dist/dropbox-lnx.x86_64-59.4.93/dropbox'
mode=0o100755 uid=1000 gid=1000
parent mode=0o40755 uid=1000 gid=1000

trace.__file__: '/home/adrian/.dropbox-dist/dropbox-lnx.x86_64-59.4.93/python-packages-35.zip/dropbox/client/ui/common/boot_error.pyc'
real_path='/home/adrian/.dropbox-dist/dropbox-lnx.x86_64-59.4.93/python-packages-35.zip/dropbox/client/ui/common/boot_error.pyc'
not found
parent not found
tempdir: '/tmp'
real_path='/tmp'
mode=0o41777 uid=0 gid=0
parent mode=0o40755 uid=0 gid=0
Traceback (most recent call last):
File "dropbox/client/main.pyc", line 6821, in main_startup
File "dropbox/client/main.pyc", line 3152, in run
File "ui/common/uikit.pyc", line 802, in create_ui_kit
File "dropbox/client/ui/qt/__init__.pyc", line 43, in <module>
File "<_bootstrap_overrides>", line 153, in load_module
ImportError: libXrender.so.1: cannot open shared object file: No such file or directory
(END)

Poll
Which Dropbox integrations are you using while working from home?
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?