get_iplayer.cgi and permissions

John Crisp jcrisp at
Mon Oct 15 09:43:36 EDT 2012


I have used get_iplayer on & off for a while and thought I would try to
run the cgi with my apache server.

I don't want to run it as a the stand alone version as the server is on
a DMZ so exposed ( it does work when tested)

With Apache I have a number of directories that can only be viewed on
the local network and wanted to try and run the cgi script from one of them.

I added the ScriptAlias line and can get the web interface up but get
the following error :

CMD STDERR: mkdir /.get_iplayer: Permission denied at ./get_iplayer line 346

And also :

CMD STDERR: mkdir /.get_iplayer: Permission denied at ./get_iplayer line
346, referer:

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.

Is there any way the cgi could direct to a 'standard' profile directory
?? e.g I make the profile directory in /opt/get_iplayer/.get_iplayer and
then refer to it with --profile-dir ???

I tried by changing the above line to :

my $home = "/path/to/profile/directory";

But that fails too - I tried a few different locations and checked that
apache had permissions.

Bit stumped as to what to do next !

Any help gratefully appreciated

B. Rgds

More information about the get_iplayer mailing list