treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] Using SSH to install Dropbox

  • I'm trying to install Dropbox onto my hosting server using SSH.

    I'll be honest, I have no idea what I'm doing and after following a tutorial, I'm getting some sort of error.

    I'm using the command that Dropbox says to use.

    Command:

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

    Error:

      Connecting to www.dropbox.com|199.47.217.170|:443... connected.
      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'.
      Unable to establish SSL connection.
    
      gzip: stdin: unexpected end of file
      tar: Child returned status 1
      tar: Error exit delayed from previous errors
    

    If I use --no-check-certificate-, I get:

      wget: unrecognized option `--no-check-certificate-'
    
      gzip: stdin: not in gzip format
      tar: Child returned status 1
      tar: Error exit delayed from previous errors
    

    Not sure what this is about: https://www.dropbox.com/help/247/en

  • Not sure if this will work, but can you use http instead of https? Not sure if you need to use --no-check-certificate with that or not.

  • Will try, thank you @DustinWoods.

  • This is what I get when I try using http instead of https

    --2012-12-23 13:00:42--  http://www.dropbox.com/download?plat=lnx.x86
    Resolving www.dropbox.com... 199.47.217.170, 199.47.217.171, 199.47.216.170, ...
    Connecting to www.dropbox.com|199.47.217.170|:80... connected.
    HTTP request sent, awaiting response... 302 FOUND
    Location: https://www.dropbox.com/download?plat=lnx.x86 [following]
    --2012-12-23 13:00:42--  https://www.dropbox.com/download?plat=lnx.x86
    Connecting to www.dropbox.com|199.47.217.170|:443... connected.
    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'.
    Unable to establish SSL connection.
    
    gzip: stdin: unexpected end of file
    tar: Child returned status 1
    tar: Error exit delayed from previous errors
    
  • I think I got it. At least it downloaded something. The issue was that I was using no-check-certificate- when I should have just used no-check-certificate.

  • I may need help following the rest of the steps.

    I tried

      ~/.dropbox-dist/dropboxd
    

    which returned

      -jailshell: /home/username/.dropbox-dist/dropboxd: No such file or directory
    
  • Hmm, can you check if the downloaded file was unzipped? If it didn't, you'll probably see dropbox-lnx.x86-1.6.10.tar.gz sitting in your directory.

    Try tar xzf dropbox-lnx.x86-1.6.10.tar.gz and then ~/.dropbox-dist/dropboxd

  • @DustinWoods Basically what I did was login to CPanel > File Manager > Root > Click on the file and hit unzip. That created the correct folders.

    Now in the command line, I keep getting "Please visit this link to connect.." blah blah.

  • Oh perfect! Dropbox says you have to visit the link to set up a Dropbox account. Then you should be good to go.

  • @DustinWoods I did actually link it but the terminal keeps displaying the link and won't stop. Haha. No idea what to do now.

  • Wow. Just got it. I was trying to hit Cntrl + C to copy the link but that just kills the terminal running.

  • Haha, that always gets me too

  • All right. I'm on the very last step and of course I can't figure this out either. http://getkirby.com/blog/kirby-meets-dropbox

    The part that starts at Connect Kirby with Dropbox. I tried that command with my correct file paths and it just hangs there and does nothing in the terminal.

  • Are you talking about this part: ln -s /var/www/mykirbysite.com/content ~/Dropbox/mykirbysite?

  • @DustinWoods Correct. That command just hangs there. I think there might be something I have to do with a CLI script. At least that's what it talks about in this tutorial.

  • Hmm, the line of code is just supposed to create a symlink for Dropbox. When you access Dropbox, do you see the kirby folder?

  • Nope. I don't see anything but the Photos folder.

  • @DustinWoods However, it's syncing my folder on the server but not to Dropbox: http://cloud.chrisburton.me/Lm7T

  • Got that part. It's suggesting that I need to update to Python 2.6. How/where do I update that?

  • I think if you head over to the website they should have instructions somewhere.

    Wow, you've had a lot of hoops to jump through!

  • Tell me about it. I've been working on this for several hours now. They should really make this easier for those that have no clue about SSH. Thanks for the link, checking now.

  • I just want to document the error I'm getting.

    FINISHED --2012-12-23 19:18:20--
    Downloaded: 1 files, 108K in 0.06s (1.65 MB/s)
    user@mydomain.net [~]# chmod 755 ~/bin/dropbox.py
    user@mydomain.net [~]# ~/bin/dropbox.py help
      File "/home/user/bin/dropbox.py", line 159
        with open(pidfile, "r") as f:
                ^
    SyntaxError: invalid syntax
    

    This is what the tutorial states:

    update to Python 2.6 and it will go away. Or better try python2.6 rather than your plain command python as you may already have it installed.

    NOTE: For CentOS users, use either the EPEL or IUS repo to install the python26.<arch> RPM. The package installs Python 2.6 in parallel to the distribution default version. This way YUM will not be effected by the newer version. Once installed update the hash-bang line to refer to /usr/bin/python26 or /usr/bin/python2.6.

  • Hosting provider won't upgrade Python.

  • What exactly is the python script for? From what I read, it sounds like it just provides command-line support for managing Dropbox. Isn't there a GUI?

  • This is what I received from my hosting provider:

    Futhermore, I believe Dropbox uses a daemon and needs to be running at all times, which wouldn't work in a shared hosting environment either. You'd be better off on a VPS if this is something you wanted to run, however I can't promise that it's going to run, even on a VPS due to the python versions. It will break some of cPanel's functionality by upgrading python.

    I'm not sure that is true because Webfaction (a shared hosting provider) allows you to do this. Although, I think they have an upgraded version of Python.

    I believe the command I used which received that error above is allowing my files to sync to Dropbox.

    This is the tutorial: http://www.dropboxwiki.com/Text_Based_Linux_Install