EPERM: operation not permitted, stat

Post Reply
PdFUser5000
Member
Posts: 120
Joined: Fri Jun 12, 2020 11:23 am

EPERM: operation not permitted, stat

Post by PdFUser5000 »

My script is trying to overwrite a file in the server, but gets the following error: EPERM: operation not permitted, stat'( filename + location)'

I have not had this error before and this only appears with one unique file. Other files in the same folder work fine.Nobody has the file open.
What could be the reason?
freddyp
Advanced member
Posts: 1008
Joined: Thu Feb 09, 2012 3:53 pm

Re: EPERM: operation not permitted, stat

Post by freddyp »

If it works well with all other files, what else can it be other than file access rights?

If your script crashes because of this and the script element goes into an error state, place the overwriting of the file inside a try-catch block and in the catch you can then query the stats of the file and log a message.
Post Reply