linuxbash

-bash: script.sh: /usr/bin/ksh: bad interpreter: Permission denied


I have some problems with ksh. Logs says we don't have permission to access to ksh. All rights are 777 and we did the symbolic link into /usr/bin/

In /usr/bin :

lrwxrwxrwx  1 root root          8 Feb  2 10:29 ksh -> /bin/ksh

In /bin

lrwxrwxrwx  1 root root      21 Dec 23 11:15 ksh -> /etc/alternatives/ksh

In /etc/alternatives

lrwxrwxrwx 1 root root 8 Feb  2 10:01 /etc/alternatives/ksh -> /usr/bin

Did something go wrong during installation ?

It's quite critical for me, thanks for you help !


Solution

  • Going through your question:

    Here is the ksh installation of my system for reference:

    [root@ ~]# which ksh
    /bin/ksh
    [root@ ~]# ls -larth /bin/ksh
    lrwxrwxrwx 1 root root 21 Feb  2 10:21 /bin/ksh -> /etc/alternatives/ksh
    [root@ ~]# ls -alrth /etc/alternatives/ksh
    lrwxrwxrwx 1 root root 10 Feb  2 10:21 /etc/alternatives/ksh -> /bin/ksh93
    [root@ ~]# ls -alrth /bin/ksh93
    -rwxr-xr-x 1 root root 1.5M Nov  3 14:02 /bin/ksh93