The integrated file system creates these directories when the system is restarted if they do not already exist.
Once an application puts an object in the /tmp directory, the object stays there until you or the application removes it. The system does not automatically remove objects from the /tmp directory or perform any other special processing for objects in the /tmp directory.
You can use the user displays and commands that support the integrated file system to manage the /tmp directory and its objects. For example, you can use the Work with Object Links display or the WRKLNK command to copy, remove, or rename the /tmp directory or objects in the directory. All users are given *ALL authority to the directory, which means that they can perform most valid actions on the directory.
An application can use the application program interfaces (API) that support the integrated file system to manage the /tmp directory and its objects. For example, the application program can remove an object in the /tmp directory by using the unlink() API.
If the /tmp directory is removed, it is automatically created again during the next restart of the system.
The /tmp directory can have the restricted rename and unlink attribute set to Yes for operating system commonality and security purposes.
If the restricted rename and unlink attribute is set to Yes, you cannot rename or unlink objects within the /tmp directory unless one of the following conditions is true:
If the attribute is set to Yes, and you do not have the appropriate authorities, you will see error number 3027 (EPERM) or message MSGCPFA0B1 (Requested operation not allowed. Access problem) for rename or unlink failures when using the following commands and APIs:
The restricted rename and unlink attribute and S_ISVTX mode bit can be modified using the Change Attribute (CHGATR) command or the Set Attributes (Qp0lSetAttr()) or Change File Authorizations (chmod) APIs if you are the owner of the object, or if you have all object (*ALLOBJ) special authority. But, if the attribute is changed to No, you will lose the operating system commonality and security benefits that the Yes setting provides.
When the /tmp directory is created during a restart of the system, the attribute is set to Yes. If the /tmp directory already exists during a restart of the system, the attribute is not changed.