Also check for errno.EPERM to trigger fallback locking mode