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
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.
I used pgp long back..However I am pretty sure the key (private) is user specific so if you created the key pair from user1 and trying to decrypt it from user2 it will fail.
Whenever you try to generate pgp key pair it will store it under /home/username/.pgp/pgp.cfg this means its user specific files and stored under home directory of individual user.
---------- Post updated at 02:41 PM ---------- Previous update was at 02:34 PM ----------
Hello,
I've just started using a Solaris machine with SunOS 5.10.
After the machine is turned on, I open a Console window and at the prompt, if I execute a pwd command, it tells me I'm at my home directory (someone configured "myuser" as default user after init).
... (2 Replies)
I wrote a simple test.java program in vi. I know it compiles correctly because I went into the directory where test.java was and compiled it and it created a java.class. I then ran test.java by staying in the same directory where it was and it worked great.
However, when i backed out of the... (3 Replies)
hi ,
:wall:
I've in directory home user 3 file with blank space in name file, I would like erase the all character that no have alphanum more dot in namefile from home root , below the script.
If I execute the shell script from directory where stay it's execute well done.But I would like... (1 Reply)
Hi I am new to shell scripting. There is a requirement to write a shell script to meet follwing needs.Prompt reply shall be highly appreciated.
script that will compare two config files and produce 2 outputs - actual config file and a report indicating changes made.
OS :Susi linux ver 10.3.
... (4 Replies)
I only know how to list all sub-directories or files in specified directory. I don't know how to order them by modified date, furthermore, I don't know how to get the top one file in the sorted list. Wish you can do me a favor. Thanks in advance! (3 Replies)
Hi,
I want to use a config file as the base file and parse over the values of country and city parameters in the config file and generate separate config files as explained below.
I will be using the config file as mentioned below:
(config.txt)
country:a,b
city:1,2
type:b1... (1 Reply)
Hi,
I've created solaris user which has both FTP and SFTP Access. Using the "ftpaccess" configuration file options "guest-root" and "restricted-uid", i can restrict the user to a specific directory. But I'm unable to restrict the user when the user is logged in using SFTP.
The aim is to... (1 Reply)
hello there !
I am in my current working directory, and i want search a file in "dev" directory which is under root(/), but i donot want leave my current working directory.
is it possible to find file like that ?
let us say i am in /home/bin/user/malik/abid directory and i want find a file... (2 Replies)