Notes on Install of Dropbox CLI on CentOS 6.9:
EACH user gets a FULL COPY. So choose one user to get it all. Then make other users each a member of the first user's personal group. This is a security hazard, but messing with permissions to give others rights (e.g. 774 or 775 is worse.)
On our server, we only had the Domino server adding files to Dropbox, so we made the user "notes" and set-it to use one of the Dropbox e-mails / IDs.
Installed the 64-bit Dropbox software:
We couldn't get the file directly via wget. Therefore, we downloaded dropbox-linux-x86_64.tar.gz, and use FileZilla to transfer it to the server via SSH.
We created the target folder /opt/dropbox.
$ sudo mkdir /opt/dropbox/
We extracted the file like so:
$ sudo tar xzfv dropbox-linux-x86_64.tar.gz --strip 1 -C /opt/dropbox/
We next linked the client:
Run the daemon:
$ /opt/dropbox/dropboxd
After printing some startup software library load messages, the software gives you a web site URL. Copy and paste the URL links from SSH session, to your local workstation browser.
Dropbox will then choose your default Dropbox login. If it is the correct one, click Connect. If not, click the text connect a different account.

Back in the server SSH session, a message will replace the other saying, This computer is now linked to Dropbox. Welcome <my id>.
We then searched for an init script and found this one:
"https://gist.githubusercontent.com/thisismitch/6293d3f7f5fa37ca6eab/raw/2b326bf77368cbe5d01af21c623cd4dd75528c3d/dropbox"
Via FileZilla, we once again copied it to the server, and transferred it to the /etc/init.d/ folder as dropbox, along with the accompanying service file.
If using init.d:
$ cd /home/<myid>/tmp/
$ sudo cp dropbox /etc/init.d/dropbox
$ sudo chmod a+x /etc/init.d/dropbox
If using systemd:
$ sudo cp dropbox /etc/systemd/system/dropbox.service
$ sudo chmod +x /etc/systemd/system/dropbox.service
We created the config file for the init/system service:
$ cd /etc/sysconfig/
$ sudo touch dropbox
$ sudo vi dropbox
DROPBOX_USERS="<myid>"
(Notes: Replace <myid> with your LOCAL LINUX ID, not your dropbox ID/e-mail. Save and close - esc --> :wq )
If using init.d:
$ chkconfig dropbox --add
$ service dropbox start
If using systemd:
$ sudo systemctl daemon-reload
$ systemctl start dropbox
Installed 64-bit Dropbox CLI:
Downloaded the dropbox.py script. from Dropbox's web site to the workstation. Transferred it to the /opt/dropbox/ location.
$ sudo cp dropbox.py /opt/dropbox/dropbox.py
$ sudo chmod +x /opt/dropbox/dropbox.py
Make a link to the Dropbox program folder:
$ ln -s /opt/dropbox ~/.dropbox-dist
$ ln -s /opt/dropbox ~/dropbox.py
Turn off LAN sync:
$ ~/dropbox.py lansync n
Check the status of Dropbox service via the CLI:
$ ~/dropbox.py status
In our case we were already synching a lot of files, way more than we wanted since the Domino only needed a couple folders.
We then set-out to exclude folders. This is where it became painful. With the normal client, you checkbox the folders you want. With the CLI, you have to exclude what you don't want. This is terrible because this is a constant maintenance headache. In addition, the documentation for adding the exclusions didn't work with the syntax on the Dropbox web site. We finally found that this worked:
$ /opt/dropbox/dropbox.py exclude add projectfolder1 projectfolder2 project\ folder3\ with\ spaces projectfolder4 projectfolder5
You want to load this command with a lot of folders in one command, because the command takes several minutes typically even with just one folder.
Review the list with:
$ ~dropbox.py exclude list
or
$ /opt/dropbox/dropbox.py exclude list
Note:
After a short period, we gave up trying to maintain the list. Instead we created, and had to pay for another Dropbox user, so that we could make that new user only the member of the two folders it needed to have. That fixed the nightmare of maintenance of the folders.
previous page
|