in reply to Re: Passwords in scripts
in thread Passwords in scripts

Well, if you are going to store a password in a shell script (not a good idea IMHO), then make sure the people that need to use this file only have execute permission (read permission is not necessary).
Not setting read permission will only work if you are root, or if the shell is setuid root. And that's because a process with root level permissions can read any file, regardless of its permissions. If the shell is denied read access to the file, how on earth is the shell going to know what it should do? It's the same for a Perl program - if perl can't read the file, nothing will happen.

Abigail

Replies are listed 'Best First'.
Re: Re: Passwords in scripts
by jfroebe (Parson) on Mar 24, 2004 at 16:19 UTC
    Hi,

    yup, you are correct, thinking of binaries.
    Sorry about that