Informix Error -545: No write permission for table table-name.
Cause and resolution
No write permission for table table-name.
Check the accompanying ISAM error code for more information. With this database server, a database is a directory with the name dbname.dbs, while tables and indexes are files within that directory. You need to have read and write access to all these files in order to exercise normal database functions.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-545 is an OS-level file-permission error, not a SQL-privilege error: on the platform the
official text describes, a database is a directory (dbname.dbs) and each table/index is a file
within it, and the OS user the server runs as needs read/write access to those files directly.
- The table's underlying OS file lacks write permission for the user the database server process runs as — the direct, only cause on this platform.
- A file ownership or permission change made outside the database (a manual
chmod/chown, a restore from backup that didn't preserve ownership) that left the server's OS user without write access. - A filesystem mounted read-only underneath the database directory, which would deny write access to every table's file in that database, not just one.
Solutions / Resolution
- Check the accompanying ISAM error code, per the official guidance, for more specific detail about the underlying OS-level failure.
- Check OS-level file permissions on the table's file within the
dbname.dbsdirectory, confirming the server's OS user has read and write access:$ ls -l dbname.dbs/tablename - Correct ownership/permissions if they've drifted from what the server process needs, typically matching the rest of the database directory's files.
- Check whether the underlying filesystem is mounted read-only, if the permission bits themselves look correct but writes still fail.
Examples
Checking file permissions
$ ls -l stores7.dbs/orders
-rw-r----- 1 root informix ... orders
If the server runs as the informix OS user and the file's owner/group doesn't grant it write
access, that's the fix target.
Diagnostic Checks
- Check the accompanying ISAM error code first, per the official guidance.
- Run
ls -lon the table's file insidedbname.dbsto confirm OS-level read/write permissions for the server's OS user. - Check filesystem mount options for the database's location if permissions look correct.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -545 in this set yet.
An OS-level file-permission problem on the table's underlying file, not a SQL GRANT/REVOKE
issue — check ls -l on the file inside dbname.dbs.