0

I call a perl script from shell script.Since both unix shell script and perl script are created by me, i was able to execute it successfully.But when i deploy the code using anthillpro, permission of the files changed to 644. Hence when others execute this shell script, they are able to run unix script but following error is received while calling perl script.

0403-006 Execute permission denied.

Following code is used to invoke my perl script from unix shell script:

/usr/bin/perl /home/script/conversion.pl $layout_file $format_file $conv_file $base_filenm $COREPATH

First line of my perl script has following line:

#!/usr/bin/perl

Can anyone provide a solution for this issue ?

user1768029
  • 415
  • 8
  • 22
  • 1
    Give your perl script world read permission (`chmod u+r /home/script/conversion.pl`) and add execute permission for all directories on the path (`chmod u+x /home /home/script`). – mob Apr 19 '17 at 04:58
  • I get the same error even after using these commands in my shell scripts. I will deploying these files in test and prod region, where we can not change execute permission of a directory. – user1768029 Apr 19 '17 at 06:45
  • Try /usr/bin/perl --version – BOC Apr 19 '17 at 09:53
  • Please edit your question to include the output from the command `ls -l /home/script/conversion`. – Dave Cross Apr 19 '17 at 14:56
  • To add to @Dave Cross' comment, you might want to check: `/bin/ls -ld /usr/bin/perl /home/script/conversion.pl /usr/bin /home/script /usr /home /` just for yuks. – Erik Bennett Apr 19 '17 at 19:00
  • Try to write the following in the step - echo "Running perl" pwd ls -ltra /home/script/conversion.pl $layout_file $format_file $conv_file $base_filenm $COREPATH ls -ltra /home/script/ ls -ltra /usr/bin/perl echo "DONE" – Elyahu Apr 20 '17 at 07:40

0 Answers0