I agree, if the script is executed automatically without the user knowing it, it would be be a big problem.
I am looking for a behavior, which is similar to what happens when an user downloads an executable on Windows. The user should see a pop up displaying an option of opening the script with "sh". The user can choose open the file or save it to the disk.
Originally posted by Stefan Wagner: If it would be possible, we would get the big virus-invasion in linux.
I'm glad, it's not possible.
Actually, unless the browser forbids it, it is possible. All that's required is that the MIME definitions for ".sh" files be set to run rather than save, as Basudev notes.
Firefox does support download/run-with option dialogs for things like ZIP files, so there's probably a MIME preference for that, however, it's at the user's control, not the webservers and thank goodness that's so or we would get the "big virus-invasion".
Even if the option were available, however, I'd not want it. Windows users are notorious for clicking the "OK" button, and despite the elitist attitudes of some regarding Unix, I'd not want to wager that a non-geek Unix User is going to be any more discerning that an non-geek Windows user.
"privilege" comes from the Latin words for "private" and "law" (legal) and dates to feudal times. To "claim privilege" meant that you were above the laws that applied to the common people.