bash: /root/remstats.pl: /usr/bin/perl: bad interpreter: Permission denied

G

Goblin

Hello i have a little code for updating somethink in my SQL database.
I get the error: bash: /root/remstats.pl: /usr/bin/perl: bad interpreter:
Permission denied
Can someone tell me what's wrong? Or how i can fix that?

Greets, Bert

The code of the script:

#!/usr/bin/perl

use DBI;
use strict;

my $dbh = DBI->connect('DBI:mysql:traffic:localhost',
'trafficadmin', # user name
'TRAff200AGo', # password
{ RaiseError => 1});
if (!$dbh) { die "Cannot connect to database" }
my $query = 'update upload SET byte = 0';
my $sth = $dbh->prepare($query);
if (!$sth) { die "Illegal query: $query" };
$sth ->execute;
$sth->finish;
 
N

nobull

Goblin said:
I get the error: bash: /root/remstats.pl: /usr/bin/perl: bad interpreter:
Permission denied
Can someone tell me what's wrong?

Have you eliminated the obvious? Just reading the error literally,
bash is unable to execute the program /usr/bin/perl to interpret the
script /root/remstats.pl because the current process does not have the
permissions needed to do so.
Or how i can fix that?

Fix the permissions on /usr/bin/perl.
The code of the script:
... is not relevant as you are getting an error from bash before the
Perl script even loads.

This newsgroup does no exist (see FAQ). Please do not start threads
here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top