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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Goblin

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

    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:m ysql:traffic:lo calhost',
    '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;




  • nobull@mail.com

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

    "Goblin" <stuurmaarspam@ skynet.be> wrote in message news:<3f3a8305$ 0$743$ba620e4c@ reader1.news.sk ynet.be>...
    [color=blue]
    > I get the error: bash: /root/remstats.pl: /usr/bin/perl: bad interpreter:
    > Permission denied[/color]
    [color=blue]
    > Can someone tell me what's wrong?[/color]

    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.
    [color=blue]
    > Or how i can fix that?[/color]

    Fix the permissions on /usr/bin/perl.
    [color=blue]
    > The code of the script:[/color]
    ... 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.

    Comment

    Working...