Shell Script execution issues

Hi,

There's a shell script by name "download", which has been created as user "mgr" and that script needs to executed as user "dev".

I tried giving privileges 701 on the script download.
But it's throwing the error message

bin]$ ./download
/bin/bash: ./download: Permission denied

But, when ever I tried it with 705, it works fine.
Since I have a password embedded in the script "download", I want to give execute only privileges to the other user.

Please let me know how can I achieve this.

Try just giving execute permission to every one like this and try:

chmod +x file

The nature of a script is that it needs to be executable and readable (by the script interpreter).
Try to switch to another user that owns the script.
Like

sudo -u otheruser ./download

@panyam:
I have already tried that, but wasn't helpful.

@madeInGermany:
When I tried sudo -u mgr ./download.sh, it's prompting to enter the password of the user "mgr". As I mentioned earlier, the mgr password can't be shared.

sudo -u mgr ./download
[sudo] password for mgr:

These are the current permissions I have on the script.

ls -ltr download
-rwx--x--x 1 mgr mgr 1970 Feb 26 13:42 download

Try putting:

ALL ALL=(mgr) NOPASSWD: /path/to/download

in your /etc/sudoers files

--Edit--
You could then write a stub script (with 555 permissions) that runs sudo -u mgr /path/to/download

@Chubler_XL: Thanks for the reply.
Are there any other ways than this to achieve my requirement.

You could try compiling the script using shc: