[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Messages Guide and Reference

Recovering from File and Directory Permission Errors

Commands often generate error messages because of permission restrictions that are not obvious permission problems; for example, you may get a message similar to Unable to execute command or Could not access file.

In general, you should have read permission for the file you use as input, write permission for the file you enter information in, and execute permission for the command you use. Some commands can be run only by the root user. See the following to recover from file and directory permission errors:

If you cannot find the solution to your problem in these articles, return to "Recovering from Software Errors ".

Checking Files for Read and Write Permissions

To recover from read and write permission errors, do the following:

If you cannot find the solution to your problem in these articles, return to "Recovering from Software Errors".

Checking the Command for Execute Permission

To locate the command and check it for execute permissions, do the following:

  1. Find the file where the command resides (whereis Command or the which Command).
  2. Run the ls -l command to check the command. The -l flag displays the long version of the listing, including permissions and owner.
  3. Check the command for permissions and links to another command. Linked commands are displayed as a second path name.
  4. If the command is linked to another command, check that command for permissions also.
  5. If you do not have execute permission for the command, or if you do not know how to check the permissions, enter chmod +x Name to add execute permission on the file or directory.

    OR

    If you cannot change execute permission, use the su command to change to the root user or to the owner of the file or directory, and reenter chmod +x Name.

    OR

    Ask the owner of the file or directory to use the chmod command to provide you with execute permission.

    Note: You can also specify numeric arguments with the chmod command to set permissions on a file or directory for individual groups or users. For example, the chmod 777 Name command enables all permissions on a file or directory. See the "Numeric or Absolute Mode" section in the chmod command for more information.

If you cannot find the solution to your problem in these articles, return to "Recovering from Software Errors".


[ Previous | Next | Contents | Glossary | Home | Search ]