I have written one bash script and it is run on the background, inside this script I have use the following command:
sshpass -p prakash123 ssh -t -p $1 prakash@localhost './update_script.sh > /update.out 2> /update.err < /dev/null | echo $! > /update.pid &'
It is working fine. But I want to change the location of
/update.pid So modified command for that:
sshpass -p prakash123 ssh -t -p $1 prakash@localhost './update_script.sh > /pra/log/update.out 2> /pra/log/update.err < /dev/null | echo $! > /pra/log/update.pid &'
Now I am getting the permission denied error.
Because I changed the path of output files. I am not sure but I think I have to give the super user permission like
sudo before the
So how can I change the path of
/update.pid this file from the above command.?