Corinna Vinschen wrote: > Hi, > > > Here's the problem: If you exec shell scripts, they should only be run > if the user trying to run the script has execute permissions on the > script.
Shell scripts don't _have_ to be executable, only if you want to launch one as if it were a command, rather than sourcing it. Why don't we just remove the "-c" and get setup.exe to use the simple "bash <filename>" syntax meaning "treat <filename> as a text file, open it and pipe it to stdin"? [da...@ubique src]$ cat happy-script-file.txt echo "I am a happy script file!" [da...@ubique src]$ ls -la happy-script-file.txt -rw-rw-r-- 1 davek davek 33 2009-06-22 14:35 happy-script-file.txt [da...@ubique src]$ ./happy-script-file.txt bash: ./happy-script-file.txt: Permission denied [da...@ubique src]$ bash -c ./happy-script-file.txt bash: ./happy-script-file.txt: Permission denied [da...@ubique src]$ bash ./happy-script-file.txt I am a happy script file! [da...@ubique src]$ AFAIK this final syntax is equivalent to writing "cat happy-script-file.txt | bash", where of course the execute bits couldn't make any difference. cheers, DaveK -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple