No write access to source file

We have recently been getting the occasional “no write access to source
file” error when writing to a file. Our setup is Lucee 4.5.2.018 with
Tomcat 7.0.59 and Java 1.8.0_60 on Windows 2012R2. The error may have
coincided with the update to 4.5.2 but I can’t be sure. I have noticed the
error on different servers hosted with different providers, so it isn’t
isolated to a particular server.

The line that creates the error is:

Record in the exception log is attached.

We write very little to files, so I was surprised to see this type of
error. Any suggestions what might cause the error and if there might be a
workaround?

Thanks,
Simon

Simon,

You might try using as a workaround. Shot in the dark, no idea if
it would help, but it came to mind. Note you could also try with the
attribute async=“true” so the file is written to in a separate thread.

Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601
+41 (0)76 303 4477 cell
skype: ariamediaOn Wed, Dec 9, 2015 at 1:06 AM, Simon Goldschmidt <@Simon_Goldschmidt> wrote:

We have recently been getting the occasional “no write access to source
file” error when writing to a file. Our setup is Lucee 4.5.2.018 with
Tomcat 7.0.59 and Java 1.8.0_60 on Windows 2012R2. The error may have
coincided with the update to 4.5.2 but I can’t be sure. I have noticed the
error on different servers hosted with different providers, so it isn’t
isolated to a particular server.

The line that creates the error is:

Record in the exception log is attached.

We write very little to files, so I was surprised to see this type of
error. Any suggestions what might cause the error and if there might be a
workaround?

Thanks,
Simon


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/494fe24e-e6ca-45e9-9a27-58b4067842cd%40googlegroups.com
https://groups.google.com/d/msgid/lucee/494fe24e-e6ca-45e9-9a27-58b4067842cd%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

Hey Simon,

It sounds a bit like you have more than one process attempting to write to
the same file at the same time, thus locking the file in one process and
preventing the subsequent process from gaining write access. You may wish
to lock file access here (and anywhere else that is writing to the same
file) using cflock. Something along the lines of:

Hope that helps :slight_smile:

– DennyOn Tuesday, December 8, 2015 at 7:06:46 PM UTC-5, Simon Goldschmidt wrote:

We have recently been getting the occasional “no write access to source
file” error when writing to a file. Our setup is Lucee 4.5.2.018 with
Tomcat 7.0.59 and Java 1.8.0_60 on Windows 2012R2. The error may have
coincided with the update to 4.5.2 but I can’t be sure. I have noticed the
error on different servers hosted with different providers, so it isn’t
isolated to a particular server.

The line that creates the error is:

Record in the exception log is attached.

We write very little to files, so I was surprised to see this type of
error. Any suggestions what might cause the error and if there might be a
workaround?

Thanks,
Simon