LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 05-11-2005, 12:11 AM   #1
bharaniks
Member
 
Registered: May 2005
Distribution: Red Hat Linux
Posts: 36

Rep: Reputation: 15
Help Required on FILE PERMISSIONS!!!


Hi

I need your kind help on executing a script.

I've created a automate script using EXPECT and placed the
script file in path "/usr/bin/SCRIPT" now i have given a
permission of read and execute to all users in a particular
group say "group - winner" now the user "winner" has a permission
of `rwx` and a user "john" of group "winner" has `rx" permission.

If the user john is logging in and providing a command "SCRIPT"
at the command prompt then the script start works but the user
can also view the file by providing command "cat /usr/bin/SCRIPT".

As the SCRIPT contains confidential information such as passwords etc,
the user "should not be able to view the contents of the SCRIPT" but they
should execute the script.

Is there any solution for this issue.

I hope you will send me the solution.

Thanks in Advance
Bharani
 
Old 05-13-2005, 12:12 AM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
I'm pretty sure that for shell scripts, the user needs read and execute permissions to run it (because the shell has to read the script to interpret it). This is not true of binaries (execute permission alone is sufficient). There are a couple of ways around this--perhaps the simplest is make the script readable only by a certain group with no members, and then write a tiny C program that is setgid to that group and just calls the script.
 
Old 05-13-2005, 10:03 AM   #3
utsavhanda
LQ Newbie
 
Registered: Jan 2005
Location: INDIA
Distribution: Fedora Core
Posts: 7

Rep: Reputation: 0
Check Permissions !

Hi there,

Well i am also not a very HIGH one in linux field but i am using LINUX it
so 4 any mistake | plz forgive me

As far as ur query is concerned, as u had given 'rx' permissions to group to which john belongs , so it will naturally can read the script contents of the script .

But for ur problem , u can give Xecute rights to all but read & write or Read only or write only whatever to only specific users of ur choice. !

Also for Xecuting NO read rights if used !
 
Old 06-10-2005, 12:08 PM   #4
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
Re: Check Permissions !

Quote:
Originally posted by utsavhanda
Hi there,

Well i am also not a very HIGH one in linux field but i am using LINUX it
so 4 any mistake | plz forgive me

As far as ur query is concerned, as u had given 'rx' permissions to group to which john belongs , so it will naturally can read the script contents of the script .

But for ur problem , u can give Xecute rights to all but read & write or Read only or write only whatever to only specific users of ur choice. !

Also for Xecuting NO read rights if used !
as mentioned in the last post

for executing shell scripts u need read permissions as well apart from xecute permisisons
since it is interpreted

for binaries u need only execute permisions

regards
 
  


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, Help Required!!!! bharaniks Linux - Security 6 05-17-2005 02:57 AM
URL required for samba-common file br_sriram Linux - Software 1 09-18-2004 02:11 PM
Required File: libpthread.so.0 DaRk RuSs Linux - Software 7 07-15-2004 05:51 PM
changing file permissions(fast reply required) Xing Linux - Software 11 09-18-2003 11:44 PM
RFC - DNS - what is required in a zone file Bluesuperman General 0 02-25-2003 05:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 12:42 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
Open Source Consulting | Domain Registration