Closing command in linux
hi all
How can I locked important orders for exp : ls or cat , closing orders in linux server sorry for my bad eng tnx in advance |
what do you mean by locked don't get it do you mean to save a file or what
|
You can change permissions to the files (to prevent reading by cat or any other editor) and to the directory which contains the files (to prevent listing): chmod 700 should do the trick.
|
The question is not at all clear.
|
The language is not plain, but "important orders" and "ls or cat: closing" is quite clear to me. Anyway, let's see what the OP replies.
|
Here is what I think the OP really means:
Quote:
|
Quote:
chmod 700 ls ? or chmod 700 cat ? you mean was this ? right? sorry my eng is not good tnx all |
Sorry, but given your last question it's not clear what is your request. Do you want to block the usage of some commands OR do you want to block the access to some files (those ones you called important orders)?
|
I think he meant the former. Orders = commands.
Ariyan: You can't really prevent people from using ls and cat, as ls is absolutely critical for normal use of the system and cat is an extremely basic utility. Can you tell us what you really want to do? |
Quote:
Code:
# chmod 700 /full/path/to/command |
i mean (ls or cat or ... ) does not work anymore in the server
|
Quote:
In the latter case, why ? |
It sounds to me as if a lot of vital commands don't work anymore on the server. My first guess: someone has messed with the PATH variable.
|
more like the classic
chmod (or chown) -R <something> / <oops hit rtn key too soon...> That's been posted a few times over the yrs here. |
Quote:
or chmod 700 ls ? which is true ? |
All times are GMT -5. The time now is 02:30 PM. |