Kadjo

SoftDev Journal

About This Journal

24 June 2007 by Jojo Makiling

Technical concerns tend to find a solution as long as there are good people working on them. And Linux has the very best. - Linus Torvalds

Perl script bad interpreter: Permission denied

April 11th, 2009 by pepesmith

Something went wrong on my perl code which was working earlier before I made an upgrade from debian etch to lenny.
Here are the errors :
debian:/home/jojo/Desktop/pepesfile/drupal/mysite# ./index.cgi
bash: ./index.cgi: /usr/bin/perl: bad interpreter: Permission denied

On the apache log :
[error] [client 192.168.1.2] (13)Permission denied: exec of '/home/jojo/Desktop/pepesfile/drupal/mysite/index.cgi' failed

I’ve been tracing the error on it. I simply commanded the perl index.cgi on it but its fine. I suspect that there are ^M character which the DOS/Windows based text editor is giving on the first few lines of code but its fine when I try to view via VIM[1].

And then I’ve tried to look at the way the folder mysite/drupal mounted on my /etc/fstab
Here is my entry:
UUID=38c8ec02-5ef7-49fd-8607-78e4b2fe78c7 /home/jojo/Desktop/pepesfile ext3 auto,rw,user 0 0

I did add the exec on the column auto,rw,user and remounted the partition but its still not working :( .

Finally i’ve replaced that auto,rw,user,exec to defaults.

Ahh.. that solved my problem.

According to the fstab documentation here[2], “defaults uses the default options that are rw, suid, dev, exec, auto, nouser, and async.” I just need to type the other options and remove the nouser, but I’m glad fstab has this default. :D

[1] http://www.vim.org/
[2] http://www.tuxfiles.org/linuxhelp/fstab.html

Posted in Miscellaneous | No Comments »

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.