01-08-2010
I am aware of all the above possibilities. i am looking for a particular command which will help to run the script with out execute permission to the file.
I forgot that command.
Example, Some files like .bashrc in home directory of a normal user will use that command.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am logged in as root and am trying to execute a file called x_cleanup_equdata but keep getting the message
ksh: x_cleanup_equdataNEW: 0403-006 Execute permission denied.
I did FTP this file from another server using GET, would this make the difference?
I tried chmod 666 but still no luck. ... (2 Replies)
Discussion started by: markbeeson
2 Replies
2. UNIX for Dummies Questions & Answers
I'm trying to give everyone execute privileges on one of my small scripts. BUT, I don't want them to be able to view the file, just execute it.
As USER1, I have:
/usrhome/ncora/script_test CDS> $ls -la
drwxrw-rw- 2 ncora ncd 96 Jan 13 15:58 .
drwxrwxrwx 7 ncora ncd ... (10 Replies)
Discussion started by: FredSmith
10 Replies
3. UNIX for Advanced & Expert Users
I have a script, except me no one can read the script but they can execute the script. Is it possible? (14 Replies)
Discussion started by: kingganesh04
14 Replies
4. Shell Programming and Scripting
Hi Gurus,
I am new to scripting and needs your help in expect script used for telnet. I wrote a simple script as
#!/usr/bin/expect-5.43 -f
spawn telnet localhost 2233
expect "password:"
send "secret\r"
send "i data.cnbc.com\r"
send "exit\r"
expect eof
When I am trying to execute... (2 Replies)
Discussion started by: niks_yv
2 Replies
5. Shell Programming and Scripting
Here is my script.
1 echo -n "Enter file name : "
2 read file
3 chmod 777 $file
4 && W="write = yes" || W="Write = no"
5 chmod 777 $file
6 && X="Execute = yes" || X="Execute = No"
7 chmod 777 $file
8 && R="Read = yes" || R="Read = No"
... (0 Replies)
Discussion started by: qral_hdr
0 Replies
6. UNIX for Dummies Questions & Answers
I am other user who want to execute a file that its permission is -rw-rw-r--
how do I execute that file. (2 Replies)
Discussion started by: thsecmaniac
2 Replies
7. Shell Programming and Scripting
I want to check access rights permissions not for 'user', not for 'group', but for 'others'.
I want to do it by system command in which i want to use 'ls -l' and 'awk' command.
I have written the following program :
#!/usr/bin/local/perl
#include <stdlib.h>
system ("ls -l | awk... (1 Reply)
Discussion started by: shubhamsachdeva
1 Replies
8. Solaris
Hi All,
I'm new to solaris and this site but the advices in this site have helped me a lot.
Today i am facing a new issue.
We have a script for BMCDashboard and this script is not supposed to run evrytime the server is booted so we disabled the services and removed the execute... (7 Replies)
Discussion started by: Rockyc3400
7 Replies
9. UNIX for Advanced & Expert Users
In our project we have several unix scripts that trigger different processes. These scripts write logs to a particular folder 'sesslogs', create output data files in a separate directory called 'datafiles' etc. Usually L1 support team re-run these scripts . We donot want L1 support team to have... (14 Replies)
Discussion started by: waavman
14 Replies
10. Shell Programming and Scripting
Hi All,
I am not able to figure out what is the problem with calling a shell script within a shell script.
i have given all the permissions to both schell scripts.
but when i am seeing the log file error is coming like
weekly_us_push_rpts_tst.sh: ./vacation_quota_summary_detail.sh: Execute... (9 Replies)
Discussion started by: krupasindhu18
9 Replies
SETUID(1) General Commands Manual SETUID(1)
NAME
setuid - run a command with a different uid.
SYNOPSIS
setuid username|uid command [ args ]
DESCRIPTION
Setuid changes user id, then executes the specified command. Unlike some versions of su(1), this program doesn't ever ask for a password
when executed with effective uid=root. This program doesn't change the environment; it only changes the uid and then uses execvp() to find
the command in the path, and execute it. (If the command is a script, execvp() passes the command name to /bin/sh for processing.)
For example,
setuid some_user $SHELL
can be used to start a shell running as another user.
Setuid is useful inside scripts that are being run by a setuid-root user -- such as a script invoked with super, so that the script can
execute some commands using the uid of the original user, instead of root. This allows unsafe commands (such as editors and pagers) to be
used in a non-root mode inside a super script. For example, an operator with permission to modify a certain protected_file could use a
super command that simply does:
cp protected_file temp_file
setuid $ORIG_USER ${EDITOR:-/bin/vi} temp_file
cp temp_file protected_file
(Note: don't use this example directly. If the temp_file can somehow be replaced by another user, as might be the case if it's kept in a
temporary directory, there will be a race condition in the time between editing the temporary file and copying it back to the protected
file.)
AUTHOR
Will Deich
local SETUID(1)