Hi All,
While executing shell script I am getting following error.
cp: cannot create regular file ‘/search’: Permission denied
I have the permissions on 'search' directory, when I doing it manually, it is creating file successfully.
drwxr-xr-x 7 rep rep 103 Aug 22 16:43 search
Following is the script.
#######################################################################################
# Install ss_test.pkg file
#
if [ -f $PKG_HOME/search/ss_test.pkg ]; then
cp -rf $PKG_HOME/search/ss_test.pkg $PKG_HOME/search/ss_test.pkg.pre${MIGRATION}.${DATE}
fi
cp -rf ss_test.pkg $PKG_HOME/search
status=$?
if [ $status -eq 1 ]; then
echo "ss_test.pkg Execution Failed"
exit 1
else
echo "ss_test.pkg File executed Successfully"
fi
exit
######################################################################################
Thanks,
Ramaraju