Does Apache require special settings to run a command? I am trying to create an image using Bio::Perl/Bio::Graphics and implement it on my webserver. However, whenever I am trying to run my scripts online, the command line does not respond to run my script.

One of my perl module files contains this system command:

my $command = "perl Graphics.pl $start $end $attributes";
system($command);


All values are routed to this command and all scripts work perfectly fine when run manually through the command line. Apache does not report an error messages except that the file it was supposed to create in Graphics.pl hasn't been created:

&gt; [Mon Dec 16 12:15:59 2013] [error] [client ::1] Cannot Open Output 59_15_12_16_11_113_1_349_0.png, referer: http://localhost/~User/cgi-bin/Home.pl

&gt;[Mon Dec 16 12:15:59 2013] [error] [client ::1] File does not exist: /Users/User/Sites/cgi-bin/59_15_12_16_11_113_1_349_0.png, referer: http://localhost/~User/cgi-bin/Results.pl?start=1000&amp;end=20000&amp;chr=All&amp;type=protein


Is there an additional setting that needs to be configured in the Apache settings so it can use the command line?

My specs are the following:


Server version: Apache/2.2.24 (Unix)
perl 5, version 16, subversion 2 (v5.16.2)
Mac OS 10.9 Mavericks


Any help would be greatly appreciated.
The problem has been solved. Basically Apache did not have permission to write into the folder. Steps to solve the issue included:


ls -la cgi-bin to check the permissions of my cgi-bin folder.
Give the _www group ownership of cgi-bin and give the group write permissions: chgrp -R _www cgi-bin &amp;&amp; chmod g+w cgi-bin.
In addition, I added my User to the group _www so I would not have to authenticate myself every time I added a file in the cgi-bin folder. 
sudo dseditgroup -o edit -a ikr -t user _www was used to do Step 3 (ikr has to be replaced with the username to be added)