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

Discussion in 'Perl' started by Goblin, Aug 13, 2003.

  1. Goblin

    Goblin Guest

    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;
    Goblin, Aug 13, 2003
    #1
    1. Advertising

  2. Goblin

    Guest

    "Goblin" <> wrote in message news:<3f3a8305$0$743$>...

    > 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.
    , Aug 14, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Salerno
    Replies:
    30
    Views:
    1,927
    Stephan Kuhagen
    Aug 10, 2006
  2. Yves Dorfsman

    #!/usr/bin/env python vs. #!/usr/bin/python

    Yves Dorfsman, May 2, 2008, in forum: Python
    Replies:
    27
    Views:
    1,960
    Tim Roberts
    May 10, 2008
  3. anne001
    Replies:
    1
    Views:
    355
  4. Mark Richards
    Replies:
    6
    Views:
    247
    A. Sinan Unur
    Nov 18, 2007
  5. Gilles
    Replies:
    7
    Views:
    538
    Matej Cepl
    Sep 30, 2012
Loading...

Share This Page