LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-31-2002, 04:40 AM   #1
KevStA
Member
 
Registered: Dec 2001
Location: Birmingham, UK
Distribution: Red Hat 7.2
Posts: 96

Rep: Reputation: 15
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.
 
Old 05-31-2002, 05:42 AM   #2
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
yes, it is possible as root
chown root.root /bin/ls
chmod 600 /bin/ls
 
Old 05-31-2002, 05:42 AM   #3
fuxored
LQ Newbie
 
Registered: May 2002
Distribution: RedHat, Gentoo
Posts: 17

Rep: Reputation: 0
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.
 
Old 05-31-2002, 05:44 AM   #4
fuxored
LQ Newbie
 
Registered: May 2002
Distribution: RedHat, Gentoo
Posts: 17

Rep: Reputation: 0
and apparently neo77777 types just a whee bit faster than me
 
Old 05-31-2002, 05:51 AM   #5
geoffm33
Member
 
Registered: May 2002
Distribution: RH 7.3 - YDL 2.3
Posts: 63

Rep: Reputation: 15
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.
 
Old 05-31-2002, 07:46 AM   #6
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
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.
 
Old 05-31-2002, 09:11 AM   #7
KevStA
Member
 
Registered: Dec 2001
Location: Birmingham, UK
Distribution: Red Hat 7.2
Posts: 96

Original Poster
Rep: Reputation: 15
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
file permissions OK, but command permissions? stabu Linux - General 2 10-05-2005 12:00 PM
commands scripttron75 Linux - General 4 10-03-2005 04:36 PM
permission ... permissions .... permissions alaios Linux - General 1 05-31-2005 04:16 AM
getting a directory's permissions and creating a new one with the same permissions newbie1000101 Programming 1 04-10-2004 12:52 PM
What Commands do I use to change permissions Stevetgn Linux - Newbie 3 01-20-2004 03:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration