Search code examples
linuxpermissionssudo

sudo: command not found when changing the permissions of a directory


I want to execute this command sudo chgrp -R tomcat /opt/tomcat, but I get :

No command '​sudo' found, did you mean:
 Command 'sudo' from package 'sudo-ldap' (universe)
 Command 'sudo' from package 'sudo' (main)
sudo: command not found

How should I change permissions in this case?


Solution

  • You have several possibilities:

    1. Install sudo by apt-get install sudo (run it from root account)
    2. Run as root user su -c "chgrp -R tomcat /opt/tomcat"