Informix Error -851: Cannot drop file (check file permissions).
Cause and resolution
Cannot drop file (check file permissions).
You requested that a file be dropped, but it could not be dropped, probably because your account does not have write permissions on it or on the directory in which it is stored. Use operating-system commands to check the file permissions.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-851 fires when a file-drop request fails — per the official guidance, probably a write- permission problem on the file itself or on the directory that holds it (removing a file requires write permission on its containing directory, not just the file).
- No write permission on the containing directory, per the official guidance — since removing a directory entry requires directory-level write access, not just file-level.
- No write permission on the file itself, in environments/tools where that also factors in.
Solutions / Resolution
- Use operating-system commands to check the file permissions, per the official guidance:
ls -l the_file ls -ld "$(dirname the_file)" - Correct permissions on the file and/or its containing directory, as needed.
Examples
Checking both the file and its directory
$ ls -l the_file
$ ls -ld "$(dirname the_file)"
Diagnostic Checks
- Check both the file's own permissions and its containing directory's permissions — removing a file needs write access to the directory specifically.
Related Errors / Related Topics
- -816 — "Cannot write file (check file permissions)." A related file-permission error, for writing to a file rather than dropping/removing it.
- -817 — "Cannot read file (check file permissions)." A related file-permission error, for reading rather than dropping.
Check the containing directory's write permission, not just the file's own — removing a file needs directory-level access.