Installing MediaGoblin on a HostGator shared server: Not Allowed

The following tutorial is a bastardized version of that given by MediaGoblin devs. It does not include setup for PostgreSQL. It does not include instructions on how to run MediaGoblin as a separate user, as you do not have permissions to do that on HostGator servers. MediaGoblin will run as your account. This process requires calls or chats to customer support. Prerequisites:

  • Shell access to your shared-host Linux HostGator account
  • Working knowledge of the shell

Steps:

  1. ssh -p 2222 accountname@yourdomain.com
  2. cd to the directory you want MediaGoblin to be set up in. This should be in public_html. If you’re in ~, Mediagoblin will be set up in ~/mediagoblin, and will not be visible to the web.
  3. git clone http://gitorious.org/mediagoblin/mediagoblin.git
  4. cd mediagoblin
  5. Contact customer support. Tell them that you would like to have a virtualenv set up in (output of pwd) on (output of uname -n). They will need to use the command virtualenv --system-site-packages . || virtualenv . You may have to escalate or file a support ticket.
  6. Once the virtualenv is set up, python and its associated files will be installed in ~/bin/
  7. ~/bin/python setup.py developThis step will fail with the following error:

    Running py-bcrypt-0.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-BWVzJ5/py-bcrypt-0.2/egg-dist-tmp-U3y69Y
    unable to execute gcc: Permission denied
    error: Setup script exited with error: command 'gcc' failed with exit status 1

  8. Given that this will happen, you’ll have to contact customer support again. Tell them that you experienced whatever error you got (most likely related to gcc) and you would very much appreciate it if they pretty please would run the setup script for you.

Update after the break.
So, after some more canoodling around, I made progress, tracking the problem down to one command.

The setup script attempts to install some things, but it can’t do that because your HostGator jailshell won’t allow you access to gcc. Therefore:

  1. pip install PasteDeploy
  2. easy_install (insert URL of PasteScript tar.gz here)
  3. And then you’re stuck back at the py-bcrypt issue. To confirm that you’re stuck, rerun python setup.py develop

Here’s where things get hairy: It’s possible to cross-compile py-bcrypt for the CentOS server configuration that HostGator’s Linux shared accounts use.

In my emails with the sysadmins, they made it clear that running my own Python modules on their machines “is not supported on a shared environment.” They are willing to help me do it on a VPS or a dedicated server, but those cost more money.

There is liability involved for modules that are compiled, including resource usage issues and account security. The account for which the code was executing would be responsible for any issues the software causes, including any potential security risks in the event that the software is compromised.

On a shared hosting environment, these risks cannot be taken lightly, and are therefore not allowed for the security and consistency of the system as a whole.

Once again, this level of customization of the software on the server is available for hosting packages that include root level access, such as a VPS or dedicated server. We would be glad to assist you with this on either of those package types.

<sigblock>

So there we are: Running MediaGoblin is not possible on a HostGator Shared Account

2 comments

  1. joar says:

    What about rolling your own gcc binary?

Leave a Reply

Your email address will not be published. Required fields are marked *