![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do i change to super user then revert back to ordinary user ,using shell script? | wrapster | Shell Programming and Scripting | 3 | 06-04-2008 08:11 AM |
| New User Looking for help with a shell script. | WhitesinHolland | Shell Programming and Scripting | 7 | 02-13-2008 11:13 AM |
| su to another user in shell script | akdwivedi | Shell Programming and Scripting | 1 | 08-15-2007 02:14 AM |
| Run shell script as different user | mskarica | UNIX for Advanced & Expert Users | 8 | 04-30-2005 06:59 PM |
| User Shell script | HOlli | UNIX for Dummies Questions & Answers | 2 | 01-08-2002 04:31 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
I have a master shell script in csh to do some tasks where some output files will be created under a sub-directory. That shell script will also rsh to another host machine to run other shell scripts.
Since I want to allow a common user 'A' to execute my shell scripts in order to get the output files, my shell scripts will make a copy of the output files into a sub-directory under user 'A' home directory (user 'A' has set the folder permission to allow me to do so). I set the file permission of my master shell script to be "-wrx-rx-rx" to allow user 'A' to run my master shell script so as to get the output files. However, when user 'A" executes my master shell script, some interactive prompt for confirmation appear, e.g. removing files or overwriting files, during the execution time. (no any interactive prompt if I run the shell script with my username) I checked that user 'A' has set the alias rm as 'rm -i' and cp as 'cp -i'. My questions:- 1) When user A executes my shell script, is the script executed under my own user environment or user A environment? 2) How can I allow user 'A' to only execute my shell script without privilege to read (hence not able to copy out)? 3) Any other better means to achieve my purposes? Anyone can help. Thanks. |
|
||||
|
Quote:
Foe 3), I already use "rm -f" for file deletion in all my shell scripts. From manual page, it seems that "rm -i" override "rm -f" indeed. If this is true, I may unalias the rm first before "calling" my shell script. Any ideas? |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|