0

I am new to scripting part. I have a cron job running which trigger a shell script file. Inside the file I have below command to remove the file pbrun rm -f {some file location}

I have to use pbrun because file is having the required permission for root (which I don't have) and for pbrun. Manually running the same command deletes the desired file but running it through script it is not working.

Gavin
  • 1,070
  • 18
  • 24
Anshu
  • 1
  • 3
  • Not sure, but cron jobs may not run as a user, and therefore permission that have been assigned to your user account will not be available. Perhaps this is the cause? – Gavin May 14 '18 at 11:21
  • cron jobs can be run for particular user. Option -u allows for same. But my requirement is different. I have to delete a file through pbrun command. I don't have permission for deleting so I am using pbrun. This command works fine if entered manually. – Anshu May 14 '18 at 13:21

0 Answers0