Posts tagged CSH script is not running for a non cpanel created user

CSH script does not show any output for non cPanel user

If the csh file not showing any output while executing a .csh file for a non cPanel user then it is because of the file “/etc/profile.d/locallib.csh” .

 

Apply the below fix for this ::

 

open the file : /etc/profile.d/locallib.csh and replace the code : eval $(perl -Mlocal::lib) with eval `perl -Mlocal::lib`

 

So it should show the output as ::

 

 cat /etc/profile.d/locallib.csh

#cPanel Added local::lib -- BEGIN
setenv LOCALLIBUSER $USER
if ( -e /usr/bin/whoami ) then
        setenv LOCALLIBUSER `whoami`
endif
if ( "$LOCALLIBUSER" != "root" ) then
    eval `perl -Mlocal::lib`
endif
#cPanel Added local::lib -- END

instead of

 

cat /etc/profile.d/locallib.csh

#cPanel Added local::lib -- BEGIN
setenv LOCALLIBUSER $USER
if ( -e /usr/bin/whoami ) then
setenv LOCALLIBUSER `whoami`
endif
if ( "$LOCALLIBUSER" != "root" ) then
eval $(perl -Mlocal::lib)
endif
#cPanel Added local::lib -- END

That’s all.