Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
The problem statement, all variables and given/known data:
PGP encryption works manually but not with crontab
Relevant commands, code, scripts, algorithms:
Below Command works fine manually
pgp --encrypt $file_path --recipient "publickey" -v --home-dir /$HOME/alice/.pgp/
But the same command when included in a test.sh and scheduled through crontab, it gives "pgp: not found" error
The attempts at a solution (include all code and scripts):
I assume that crontab kicks off with root user and the root user is unable to find the location of pgp installed in the user alice.
Specified --home-dir argument explicitly, even then it didn't work.
Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
WIP, IL, USA
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
Thanks for the reply Corona688.
Tried it with absolute path /opt/pgp/bin/pgp, manually it works. But, with crontab it gives ld.so.1: pgp: fatal: relocation error: file /opt/pgp/lib/libstdc++.so.6: referenced symbol not found.
Further, I tried to set environment variable $LD_LIBRARY_PATH to include /opt/pgp/bin using below command:
set $LD_LIBRARY_PATH = /opt/pgp/lib:$LD_LIBRARY_PATH.
Still the LD_LIBRARY_PATH value remains the same (It's not updated)
Please suggest