hi,
i have written a shell script inside which i am using a pgp command to encrypt a file. when pgp command is run , there is a /.pgp/pgp.cfg file in my home directory.
i logged into the unix server with my userid, when i run the script from the command prompt, pgp is successful, since i am logged in with my username.
but when i run the script from a web interface , pgp command fails. since a different user is running the script.
error in the log file is
"Error: Unable to open config file /var/www/.pgp/pgp.cfg, No such file or directory."
this is because i have not set the pgppath in the shell script.
so my question is, when i ran it from command prompt after loggin in with my username, it read the pgp.cfg file from /.pgp/pgp.cfg in my home directory.
but when i tried running from web interface as a different use , it tried to search for pgp.cfg in /var/www/.pgp/ directory.
1) From command prompt after loggin in with my userid
why it didnot tried to look for the pgp.cfg file in /var/www/.pgp/ directory , why did it looked into my home directory for pgp.cfg file?
2) From web interface , calling the script as a different user,
why did it try to look for pgp.cfg in /var/www/.pgp/ directory.