LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Permissions on commands (https://www.linuxquestions.org/questions/linux-newbie-8/permissions-on-commands-22236/)

KevStA 05-31-2002 04:40 AM

Permissions on commands
 
Hello all,

I'm just messing about with permissions on files, but i am wondering if it is possible to disable some commands like ls and cat?


Thanks.

neo77777 05-31-2002 05:42 AM

yes, it is possible as root
chown root.root /bin/ls
chmod 600 /bin/ls

fuxored 05-31-2002 05:42 AM

Not sure exacly why you would want to disable commands. If you don't want someone to list the directory or see what's in the file, don't give them any permission to it.

But yeah I guess you could change the permissions on the command itself so they can't execute it.

fuxored 05-31-2002 05:44 AM

and apparently neo77777 types just a whee bit faster than me :D

geoffm33 05-31-2002 05:51 AM

Keep in mind that you should only become root when you need to do something that only root can do. The rest of the time you should be a regular user.

If you limit access to commands like ls, make sure you don't lock yourself out from it for your non-root account.

MasterC 05-31-2002 07:46 AM

Wow, you are a bad dude disabling ls. I would drop dead if I did something like that because I would forget how to change it back. Then I would really be screwed.

KevStA 05-31-2002 09:11 AM

Thanks for the help guys, it's much appreciated.

Ps. hehehe, MasterC, it's not really going to bother me yet because i'm just messing about with what commands i can disable :)

Thanks again guys.


All times are GMT -5. The time now is 09:59 AM.