LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Closing command in linux (https://www.linuxquestions.org/questions/linux-newbie-8/closing-command-in-linux-740462/)

Ariyan 07-16-2009 03:30 AM

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

shahz 07-16-2009 03:33 AM

what do you mean by locked don't get it do you mean to save a file or what

colucix 07-16-2009 03:36 AM

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.

vikas027 07-16-2009 03:40 AM

The question is not at all clear.

colucix 07-16-2009 03:44 AM

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.

jlliagre 07-16-2009 04:10 AM

Here is what I think the OP really means:
Quote:

Originally Posted by Ariyan (Post 3609227)
How can I locked important orders

How can I find out the meaning of basic commands ?

Ariyan 07-17-2009 01:09 AM

Quote:

Originally Posted by colucix (Post 3609235)
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.

tnx bro

chmod 700 ls ? or chmod 700 cat ?

you mean was this ? right?

sorry my eng is not good tnx all

colucix 07-17-2009 02:00 AM

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)?

karamarisan 07-17-2009 03:10 AM

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?

r0b0 07-17-2009 09:21 AM

Quote:

Originally Posted by Ariyan (Post 3610344)
chmod 700 ls ? or chmod 700 cat ?

Yes. Even better would be
Code:

# chmod 700 /full/path/to/command

Ariyan 07-18-2009 05:26 AM

i mean (ls or cat or ... ) does not work anymore in the server

jlliagre 07-18-2009 05:37 AM

Quote:

Originally Posted by Ariyan (Post 3611612)
i mean (ls or cat or ... ) does not work anymore in the server

Is this a problem you are complaining of or is this a feature you want to implement ?
In the latter case, why ?

jay73 07-18-2009 05:45 AM

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.

chrism01 07-19-2009 07:24 PM

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.

Ariyan 07-21-2009 05:53 AM

Quote:

Originally Posted by chrism01 (Post 3613172)
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.

chmod -R ls ?

or chmod 700 ls ?

which is true ?

catkin 07-21-2009 01:22 PM

Hello Ariyan :)

It is hard to understand you. Maybe it is language. Maybe it is Linux knowledge. Please write in your language and use a translation website.

Best

Charles


All times are GMT -5. The time now is 06:34 AM.