Informix Error -816: Cannot write file (check file permissions).
Cause and resolution
Cannot write file (check file permissions).
The file that is specified in the prior command cannot be written. Probably your account does not have operating-system permission to write to the file. Check the permissions, and run the program again.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-816 fires when a file named in a preceding command can't be written — per the official guidance, an OS-level write-permission problem is the likely cause.
- No OS-level write permission on the file (or its containing directory, for a new file), per the official guidance — the direct, likely cause.
- The file owned by a different OS user, with no group/other permission bit granting write access to the connecting account.
Solutions / Resolution
- Check the file's permissions, per the official guidance:
ls -l the_file - Correct the permissions or ownership as needed, or choose a location the account can write to.
- Run the program again, per the official guidance, once permissions are corrected.
Examples
Checking permissions
$ ls -l the_file
-r--r--r-- 1 otheruser othergroup ... the_file
A read-only file owned by a different user explains the failure — correct its permissions or choose a different target file/location.
Diagnostic Checks
- Check the target file's (or its containing directory's) permissions and ownership against the connecting OS account.
Related Errors / Related Topics
- -817 — "Cannot read file (check file permissions)." The mirror-image error, for a read permission problem rather than write.
An OS-level write-permission problem — check the file's permissions and ownership.