Crie um novo grupo, digamos restricted_group :
groupadd restricted_group
Adicione o usuário (que você não deseja ter acesso a alguns comandos) para restricted_group :
usermod -aG restricted_group restricted_user
Use o comando chgrp para alterar o grupo de /path_to_directory_with_restricted_commands/restricted_command para restricted_group :
chgrp restricted_group /path_to_directory_with_restricted_commands/restricted_command
Por fim, use o comando chmod para alterar a permissão do arquivo:
chmod 750 /path_to_directory_with_restricted_commands/restricted_command
Você também pode aplicar permissões ao diretório:
chmod 0640 /path_to_directory_with_restricted_commands
Fonte: link