Here's the problem:
- I create a file called foo.pl containing
#!/usr/bin/perl
as the top line - I execute
chmod u+x foo.pl
I type
./foo.pl
at the command prompt and get the followingbash: ./foo.pl: Permission denied
foo.pl
at the command prompt issues the same error
The execute bit on the fill is set
-rwxrw-r-- 1 myname mygroup 73 Sep 4 12:29 foo.pl
Any ideas?
myname
? Is this file on a partition other than root partition? Also, you probably meant to say you ran./foo.pl
(I've edited your question).myname
? And is this file on a different partition than root? The partition that it is on could have thenoexec
mount option on it. You can verify that by looking at the options on the partition from the commandmount
.mount
orcat /proc/mounts | column -t