- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Perl: Excecute permission deinied
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2004 06:00 AM
тАО04-30-2004 06:00 AM
On our HPUX 11i, I get an following error when I try to run a perl script, even logged in as root.
# ./test.pl
sh: ./test.pl: Execute permission denied.
This is a very simple script:
# more test.pl
#!/opt/perl/bin
print "hi\n";
I gave 777 permission for this script.
# ll test.pl
-rw-rw-rw- 1 root symix 30 Apr 30 10:51 test.pl
The perl command has following permission:
# ll /opt/perl/bin/perl
-r-xr-xr-x 1 bin bin 1546916 Jun 21 2001 /opt/perl/bin/perl
When I execute perl -v, it runs.
How can I get it around? I would appreciate any suggestion.
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2004 06:02 AM
тАО04-30-2004 06:02 AM
Re: Perl: Excecute permission deinied
# ll test.pl
-rw-rw-rw- 1 root symix 30 Apr 30 10:51 test.pl
Should have been -rwxrwxrwx !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2004 06:03 AM
тАО04-30-2004 06:03 AM
Re: Perl: Excecute permission deinied
chmod 755 test.pl
or
chmod 777 test.pl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2004 06:05 AM
тАО04-30-2004 06:05 AM
SolutionDo a:
# chmod 750 test.pl
That will give the root user 'rwx' permissions, the group symix 'r-x' permission and no permission to anyone else.
A script MUST hav execute permission to run.
You also need to modify the first line of your script. It should be:
#!/opt/perl/bin/perl
You must have the FULL path, including the file name, to the perl executable.
Do these and your script will work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2004 06:05 AM
тАО04-30-2004 06:05 AM
Re: Perl: Excecute permission deinied
notice the rw-rw-rw- permissions ? you definitely need the "x"s instead of those "-"s
chmod 777 test.pl
hope this helps
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2004 06:07 AM
тАО04-30-2004 06:07 AM
Re: Perl: Excecute permission deinied
#!/opt/perl/bin/perl
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2004 06:07 AM
тАО04-30-2004 06:07 AM
Re: Perl: Excecute permission deinied
# ll test.pl
-rwxrwxrwx 1 root symix 30 Apr 30 10:51 test.pl
# ./test.pl
sh: ./test.pl: Execute permission denied.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2004 06:08 AM
тАО04-30-2004 06:08 AM
Re: Perl: Excecute permission deinied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2004 06:11 AM
тАО04-30-2004 06:11 AM
Re: Perl: Excecute permission deinied
MUST be the firstline of your script. You only have /opt/perl/bin you don't specify what file in that directory to use. You MUST put the file name as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2004 06:12 AM
тАО04-30-2004 06:12 AM
Re: Perl: Excecute permission deinied
#!/opt/perl/bin
should be
#!/opt/perl/bin/perl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2004 06:13 AM
тАО04-30-2004 06:13 AM
Re: Perl: Excecute permission deinied
I used this forum for the first time and I never expected to receive so much help and can solve the problem in just few minutes. Very impresssive! Thanks everyone!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-30-2004 06:16 AM
тАО04-30-2004 06:16 AM