LinuxQuestions.org
Visit Jeremy's Blog.
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 07-16-2009, 04:30 AM   #1
Ariyan
LQ Newbie
 
Registered: Apr 2009
Posts: 17

Rep: Reputation: 0
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
 
Old 07-16-2009, 04:33 AM   #2
shahz
Member
 
Registered: Sep 2006
Location: Quetta, Pakistan
Distribution: RHEL, Ubuntu, Fedora
Posts: 368

Rep: Reputation: 29
what do you mean by locked don't get it do you mean to save a file or what
 
Old 07-16-2009, 04:36 AM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
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.
 
Old 07-16-2009, 04:40 AM   #4
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,300

Rep: Reputation: 102Reputation: 102
The question is not at all clear.
 
Old 07-16-2009, 04:44 AM   #5
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
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.
 
Old 07-16-2009, 05:10 AM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.3, Oracle Linux, Mint
Posts: 9,716

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Here is what I think the OP really means:
Quote:
Originally Posted by Ariyan View Post
How can I locked important orders
How can I find out the meaning of basic commands ?
 
Old 07-17-2009, 02:09 AM   #7
Ariyan
LQ Newbie
 
Registered: Apr 2009
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by colucix View Post
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

Last edited by Ariyan; 07-17-2009 at 02:11 AM.
 
Old 07-17-2009, 03:00 AM   #8
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
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)?
 
Old 07-17-2009, 04:10 AM   #9
karamarisan
Member
 
Registered: Jul 2009
Location: Illinois, US
Distribution: Fedora 11
Posts: 374

Rep: Reputation: 55
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?
 
Old 07-17-2009, 10:21 AM   #10
r0b0
Member
 
Registered: Aug 2004
Location: Europe
Posts: 608

Rep: Reputation: 50
Quote:
Originally Posted by Ariyan View Post
chmod 700 ls ? or chmod 700 cat ?
Yes. Even better would be
Code:
# chmod 700 /full/path/to/command
 
Old 07-18-2009, 06:26 AM   #11
Ariyan
LQ Newbie
 
Registered: Apr 2009
Posts: 17

Original Poster
Rep: Reputation: 0
i mean (ls or cat or ... ) does not work anymore in the server
 
Old 07-18-2009, 06:37 AM   #12
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.3, Oracle Linux, Mint
Posts: 9,716

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Quote:
Originally Posted by Ariyan View Post
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 ?
 
Old 07-18-2009, 06:45 AM   #13
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
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.
 
Old 07-19-2009, 08:24 PM   #14
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,411

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
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.
 
Old 07-21-2009, 06:53 AM   #15
Ariyan
LQ Newbie
 
Registered: Apr 2009
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by chrism01 View Post
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 ?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Command for closing ports psyklops Linux - General 1 03-26-2010 07:44 AM
How to simulate closing a window from the command line with /usr/bin/killall? Winter Knight Linux - Desktop 5 11-10-2007 05:05 PM
Javascript:closing Firefox command albatros_la Programming 5 08-24-2006 09:21 AM
linux SU command closing script prematurely. help please? Frelov Programming 4 02-20-2006 02:14 PM
Closing a port in linux terminal..any command?? fhameed Linux - Security 1 07-21-2004 12:46 AM

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

All times are GMT -5. The time now is 12:07 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration