Writing script

This is a discussion on Writing script within the Linux Administration forums, part of the Linux Forums category; Hi, How can I write a script (say, sh shell) on Linux that doesn't allow others to view the ...


Go Back   Usenet Forums > Linux Forums > Linux Administration

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-22-2004
Karan
 
Posts: n/a
Default Writing script

Hi,
How can I write a script (say, sh shell) on Linux that doesn't allow
others to view the content of the script?
In other words, how can I hard-code it?
Thanks for any advice.


Regards,
Reply With Quote
  #2 (permalink)  
Old 04-22-2004
Bit Twister
 
Posts: n/a
Default Re: Writing script

On 21 Apr 2004 19:50:37 -0700, Karan wrote:

> How can I write a script (say, sh shell) on Linux that doesn't allow
> others to view the content of the script?


chmod 700 script_name_here

Here is something I picked up a long time ago. Sorry I do not have the author.


Everyone should have some ideal about programming just to see what
it is and what it is not.

What it is, is: Casting mystical spells in terminology, whose exact details
have exact ramfications.

What it is not, is: Talking or typing to the computer in some way that it
requires intellitgence by the machine.

What it is, is: An intricate technical art.

What it is not is: A Science.


Reply With Quote
  #3 (permalink)  
Old 04-22-2004
Mattias Honrendgard
 
Posts: n/a
Default Re: Writing script

Bit Twister <BitTwister@localhost.localdomain> wrote in message news:<slrnc8edr5.s9s.BitTwister@wb.home.invalid>.. .
> On 21 Apr 2004 19:50:37 -0700, Karan wrote:
>
> > How can I write a script (say, sh shell) on Linux that doesn't allow
> > others to view the content of the script?

>
> chmod 700 script_name_here


"man chmod" will give all the necessary details. "man chown" would be
a good idea too. "man group" also wouldn't hurt.
Reply With Quote
  #4 (permalink)  
Old 04-27-2004
joe
 
Posts: n/a
Default Re: Writing script

Mattias Honrendgard wrote:
> Bit Twister <BitTwister@localhost.localdomain> wrote in message news:<slrnc8edr5.s9s.BitTwister@wb.home.invalid>.. .
>
>>On 21 Apr 2004 19:50:37 -0700, Karan wrote:
>>
>>
>>>How can I write a script (say, sh shell) on Linux that doesn't allow
>>>others to view the content of the script?

>>
>>chmod 700 script_name_here

>
>
> "man chmod" will give all the necessary details. "man chown" would be
> a good idea too. "man group" also wouldn't hurt.


I wonder if this person means that they don't want anybody to see what's
going on with a 'ps'?
Reply With Quote
  #5 (permalink)  
Old 04-27-2004
Bit Twister
 
Posts: n/a
Default Re: Writing script

On Tue, 27 Apr 2004 13:03:59 -0400, joe wrote:

> I wonder if this person means that they don't want anybody to see what's
> going on with a 'ps'?


I was betting the OP had a password in a script and wanted users to be
able to run it and not be able to cat script_here to see password.

My chmod 700 was to flush out that requirement. Since OP has not been
back I have to surmise he just wanted to lock it down from the users.
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 02:31 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0