Sponsored Content
Top Forums Shell Programming and Scripting Other user should not read the file but can execute Post 302952918 by Amit Joshi on Monday 24th of August 2015 10:14:25 AM
Old 08-24-2015
Other user should not read the file but can execute

Hi,

I have one script for which I want that other user should not read the script file but can execute. Is there any method ?

I tried by giving 711 but it gives Permission denied to other users.

For Generic User id as a work around , I have created alias in .bashrc file and other user can run the alias(although not a good idea).

But for Individual id , I am not able to do anything. Please help.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

File read & execute problem

Hi folks, Need your help. I am writing a KSH script to read a few commands from a file & execute. I am using the following code to read the file line by line & excute each command. When I am printing each line I see it is printing properly but while excuting, the particular "ps" command... (5 Replies)
Discussion started by: tipsy
5 Replies

2. Shell Programming and Scripting

root user command in shell script execute as normal user

Hi All I have written one shell script for GPRS route add is given below named GPRSRouteSet.sh URL="www.google.com" VBURL="10.5.2.211" echo "Setting route for $URL for GPRS" URL_Address=`nslookup $URL|grep Address:|grep -v "#"|awk -F " " '{print $2}'|head -1` echo "Executing ... (3 Replies)
Discussion started by: mnmonu
3 Replies

3. Shell Programming and Scripting

How to execute commands read from another file?

Please help with this simple example. I can not figure out how to do it. A file named “job” contains only this one line:var=5I need a script to read the job file and execute it as a command. This is my attempt (it does not work):#!/bin/sh exec < job echo "var = $var"output should read “var = 5”... (5 Replies)
Discussion started by: wolfv
5 Replies

4. Linux

Restrict User to only execute the file.

Hi Gurus , I hope you are doing great . Other than owner of the file , OTHERS and GROUP should be restricted from read or write a file created by the owner. OTHERS and GROUP should be only allowed to execute the file. Thanks in advance. (8 Replies)
Discussion started by: palanisvr
8 Replies

5. Shell Programming and Scripting

How to read a file line by line and store it in a variable to execute a program ?

Hello, I am quite new in shell scripting and I would like to write a little scritp to run a program on some parameters files. all my parameters files are in the same directory, so pick them up with ls *.para >>dirafter that I have a dir file like that: param1.para param2.para etc... I... (2 Replies)
Discussion started by: shadok
2 Replies

6. Shell Programming and Scripting

Help with Bash piped while-read and a read user input at the same time

Hi I am new to writing script and want to use a Bash Piped while-read and read from user input. if something happens on server.log then do while loop or if something happend on user input then do while loop. Pseudocode something like: tail -n 3 -f server.log | while read serverline || read... (8 Replies)
Discussion started by: MyMorris
8 Replies

7. Shell Programming and Scripting

How to read the user inputted file name?

hello, I have prepared a script ------------------------------------------------ #!/bin/sh cat test.txt| sed '1d' | sed '$d' > /tmp/tmp1.txt while read line do typeset -i count=`echo $line | tr ' ' '}' | wc -c` finalcount=`expr $count - 1` echo $finalcount done <... (12 Replies)
Discussion started by: rac
12 Replies

8. Shell Programming and Scripting

Read user input, Encrypt the data and write to file

Hi, can some one help me how to encrypt and decrypt a file. AIM: reade user input, encrypt it and save it to file. while decryption read the encrypted file decrypt it and save the output in some variable. Example: consider we have Credentials.txt file with content username: password... (5 Replies)
Discussion started by: saichand1985
5 Replies

9. Shell Programming and Scripting

Read from file and execute the read command

Hi, I am facing issues with the below: I have a lookup file say lookup.lkp.This lookup.lkp file contains strings delimited by comma(,). Now i want to read this command from file and execute it. So my code below is : Contents in the lookup.lkp file is : c_e,m,a,`cd $BOX | ls cef_*|tail... (7 Replies)
Discussion started by: vital_parsley
7 Replies

10. Shell Programming and Scripting

Process to read a new file entry and execute a command

I need to develop a process/daemon which will constantly monitor a file for new entry and execute a command. for eg, there is a file /var/log/inotify.log When a new entry like below gets appeneded to this file, execute the command as follows. /home/user/public_html/bad.php|CREATE ... (2 Replies)
Discussion started by: anil510
2 Replies
FINGER.CONF(5)						      BSD File Formats Manual						    FINGER.CONF(5)

NAME
finger.conf -- finger(1) alias configuration file DESCRIPTION
The optional finger.conf file is used to provide aliases that can be fingered by local and network users. This may be useful where a user's login name is not the same as their preferred mail address, or for providing virtual login names than can be fingered. Lines beginning with ``#'' are comments. Other lines must consist of an alias name and a target name separated by a colon. A target name should be either a user, a forward reference to another alias or the path of a world readable file. Where an alias points to a file, the contents of that file will be displayed when the alias is fingered. FILES
/etc/finger.conf finger(1) alias definition data base EXAMPLES
# /etc/finger.conf alias definition file # # Format alias:(user|alias) # # Individual aliases # markk:mkn john.smith:dev329 john:dev329 sue:/etc/finger/sue.txt # # Network status message # status:/usr/local/etc/status.txt # # Administrative redirects # root:admin postmaster:admin abuse:admin # # For the time being, 'sod' is sysadmin. # admin:sod SEE ALSO
finger(1) HISTORY
Support for the finger.conf file was submitted by Mark Knight <markk@knigma.org> and first appeared in FreeBSD 4.2. BSD
August 16, 2000 BSD
All times are GMT -4. The time now is 11:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy