I installed a Perl program with many external dependencies in /opt/Soft (ubuntu 18 ) using sudo su at first step. Once installed, I exit the "sudo su" mode I could not anymore execute the program as a normal user. How to give permissions for all users to execute a program installed by sudoers? Why after I installed the program with sudo su I could not execute? I can only with sudo


I think you can give other permission for binary you want to execute,

chmod o+x /opt/soft/binaryname
  • Unfortunately, it does not work, Can't locate Module.pm in @INC – user3064106 May 24 at 15:58
  • sudo /opt/soft/binaryname, it works, but not all users are sudoers – user3064106 May 24 at 16:00
  • all Perl modules are installed under /root/.local/share/.cpan/ , this installation was not system-wide. I know the problem but not the solution – user3064106 May 24 at 16:17
  • Can you try su to root, then check env root $PATH and $LD_LIBRARY_PATH, then export the output to user environment. But if the path is under root owner, you still cannot use. – arputra May 24 at 16:19
  • echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games – user3064106 May 24 at 16:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.