get_iplayer.cgi and permissions
dinkypumpkin
dinkypumpkin at gmail.com
Mon Oct 15 18:59:02 EDT 2012
On 15/10/2012 14:43, John Crisp wrote:
> Apache has no shell or home directory.
>
> My guess is that it fails at first when it sets (in get_iplayer.cgi) :
>
> # Path to get_iplayer (+ set HOME env var cos apache seems to not set it)
> my $home = $ENV{HOME};
>
> $home returns empty.
>
> The server has no 'HOME' environment variable for apache and presume
> that the script is failing because of this whilst it tries to make a
> profile directory.
I think the idea is that you add a "SetEnv HOME <vhost_path>" directive
to your apache conf so that the forked get_iplayer reads/writes (as the
apache user) to special directories you create with the requisite
permissions. The instructions in README-get_iplayer.cgi.txt are still
valid, with one addition:
After you set up the vhost directory (/var/www/get_iplayer in the
README) as instructed, make sure the entire tree is writable by the
apache user, e.g., something like
chown -R <apache_user>:<apache_group> /var/www/get_iplayer
This is so that when you start up and do your first download, some
one-time initialisations can take place: plugin installation (to
<vhost_path>/.get_iplayer/plugins and SWF credential caching (to
<vhost_path>/.swfinfo. Once that is done you can go back and reassign
ownership of the vhost directory, get_iplayer and get_iplayer.cgi, if
you like.
More information about the get_iplayer
mailing list