I have a Craft 2 install that's been working fine until recently when the admin page is giving an error:

file_put_contents(): Exclusive locks are not supported for this stream

The front end is fine.

It seems (according to https://docs.craftcms.com/v3/config/config-settings.html) that NFS filesystems do not like Exclusive Locks, and the host uses NFS (the webserver the site is on connects to a backend filer via NFS to read the actual webfiles)

so I have tried changing


so that useFileLock is set to 'false' but this hasn't changed anything.

Thanks in advance!

1 Answer 1


Two things:

  1. Make sure you're using false the boolean and not 'false' the string.

  2. After you change useFileLocks to false, clear the craft/storage/runtime/cache folder as I believe that setting is cached for whatever the cacheDuration config setting is set to.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.