Installing Dropbox on headless Ubuntu 14.04 x64: permissions error

4

2

So I'm trying to install Dropbox (as root) following the seemingly easy instructions on dropbox.com:

cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -
~/.dropbox-dist/dropboxd

The first command executes without problem, however the second command triggers this error message:

Couldn't start Dropbox. This is usually because of a permissions error. Storing your home folder on a network share can also cause an error.

Get more help at https://www.dropbox.com/c/help/permissions_error

Please contact Dropbox support with the following info for help:

/tmp/dropbox_errorgel_th.txt

The contents of that file:

bn.BUILD_KEY: Dropbox
 bn.VERSION: 2.10.28
 bn.DROPBOXEXT_VERSION: failed
 bn.is_frozen: True
 pid: 755
 ppid: 460
 ppid exe: '/bin/bash'
 uid: 0
 user_info: pwd.struct_passwd(pw_name='root', pw_passwd='x', pw_uid=0, pw_gid=0,           pw_gecos='root', pw_dir='/root', pw_shell='/bin/bash')
 effective_user_info: pwd.struct_passwd(pw_name='root', pw_passwd='x', pw_uid=0, pw_gid=0, pw_gecos='root', pw_dir='/root', pw_shell='/bin/bash')
 euid: 0
 gid: 0
 egid: 0
 group_info: grp.struct_group(gr_name='root', gr_passwd='x', gr_gid=0, gr_mem=[])
 effective_group_info: grp.struct_group(gr_name='root', gr_passwd='x', gr_gid=0, gr_mem=[])
 LD_LIBRARY_PATH: None
 cwd: '/root'
     real_path='/root'
            mode=040700 uid=0   gid=0
     parent mode=040755 uid=0   gid=0
 HOME: u'/root'
 appdata: u'/root/.dropbox/instance1'
         real_path=u'/root/.dropbox/instance1'
                mode=040700 uid=0   gid=0
         parent mode=040700 uid=0   gid=0
 dropbox_path: u'/root/Dropbox'
              real_path=u'/root/Dropbox'
                        not found
              parent    mode=040700 uid=0   gid=0
 sys_executable: '/root/.dropbox-dist/dropbox-lnx.x86_64-2.10.28/dropbox'
                real_path='/root/.dropbox-dist/dropbox-lnx.x86_64-2.10.28/dropbox'
                        mode=0100755    uid=1000    gid=1002
                parent  mode=040755 uid=1000    gid=1002
 trace.__file__: '/root/.dropbox-dist/dropbox-lnx.x86_64-     2.10.28/library.zip/dropbox/boot_error.pyc'
                real_path='/root/.dropbox-dist/dropbox-lnx.x86_64-2.10.28/library.zip/dropbox/boot_error.pyc'
                        not found
                parent  not found
 tempdir: '/tmp'
         real_path='/tmp'
                mode=041777 uid=0   gid=0
         parent mode=040755 uid=0   gid=0
 Traceback (most recent call last):
  File "dropbox/client/main.py", line 2369, in main_startup
  File "dropbox/client/main.py", line 1421, in run
  File "dropbox/client/main.py", line 920, in activate_translation
  File "dropbox/i18n.py", line 234, in activate_translation
  File "dropbox/i18n.py", line 279, in system_lang_code
  File "dropbox/i18n.py", line 401, in get_system_languages
  File "locale.py", line 511, in getdefaultlocale
  File "locale.py", line 443, in _parse_localename
 ValueError: unknown locale: UTF-8

Quite the Linux noob here... Anyone any ideas?

Rits

Posted 2014-08-22T17:02:49.430

Reputation: 143

1Have you tried to install it with a normal user? Normally you don't want to use root for Dropbox. – max890 – 2014-08-22T19:05:42.513

Answers

5

I had the same issue while installing drop box remotely on an ubuntu 14.04 machine. I could solve it by running dropboxd with root permissions for the very first time.

sudo ~/.dropbox-dist/dropboxd

Once set up it no longer requires root privileges and properly runs under my user account. I just used the dropbox CLI tool to do so:

~$ dropbox status
Up to date
~$ dropbox stop
Dropbox daemon stopped.
~$ dropbox start
Starting Dropbox...Dropbox isn't running!
Done!

HTH :)

Tom M.

Posted 2014-08-22T17:02:49.430

Reputation: 66

While reviewing my answer I just got aware that I also had an issue with the locale settings. Try to "export LC_ALL=C" and re-run dropboxd. – Tom M. – 2014-08-26T12:32:52.363

3Running with root permissions had no effect, however export LC_ALL="en_US.UTF-8" and export LANGUAGE="en_US.UTF-8" did the trick. Thanks! – Rits – 2014-08-26T13:17:08.513

2

You need to start the connection to the server without -X:

ssh user@server

and NOT

ssh -X user@server

Then run

sudo ~/.dropbox-dist/dropboxd

and you should receive a message like this: This computer isn't linked to any Dropbox account... Please visit https://www.dropbox.com/cli_link_nonce?nonce=some_string to link this device.

Use this link into any browser and then you will have your dropbox linked

daniel

Posted 2014-08-22T17:02:49.430

Reputation: 21

Oh my. I switched from putty to MobaXterm and switched servers. Never would have guessed this, even though the clues were there! – mgriebe – 2018-05-16T17:35:25.203

0

Aside from @Tom's answer there is another edge case where the same error above is given. If you are connected to the machine in question via SSH with X11 forwarding enabled, dropbox will try and look for various X11 related libraries which may not be installed.

This is hinted in the log file that dropboxd outputs:

...
Traceback (most recent call last):
  File "dropbox/client/main.py", line 5050, in main_startup
  File "dropbox/client/main.py", line 2173, in run
  File "ui/common/uikit.py", line 473, in create_ui_kit
  File "dropbox/client/ui/qt/__init__.py", line 28, in <module>
  File "PyQt5/QtWidgets.py", line 14, in <module>
ImportError: libXdamage.so.1: cannot open shared object file: No such file or directory

The solution is simply to disable X11 forwarding when running the client.

Stav

Posted 2014-08-22T17:02:49.430

Reputation: 113

0

Similar issue, setting up dropbox on a headless linux install. Only difference is I don't have root. This is a cluster environment so the default home directories are on Lustre FS. I copied .dropbox-dist to a path on local disk and did this:

export HOME="/your/path/to"; .dropbox-dist/dropboxd

zastard

Posted 2014-08-22T17:02:49.430

Reputation: 1

-1

I had the same problem on OpenSUSE. I solved it by deleting the hidden files (press: Ctrl+h on the home folder to see it) related to dropbox, that are in /home/user/.dropbox*.

Within those hidden files there are files related to configuration of dropbox. After this, try to install the dropbox again; that may solve the problem.

Bratti

Posted 2014-08-22T17:02:49.430

Reputation: 1