User Directories


A User Directory is a special form of a URL-path that routes the server to a personalized location for Web documents. Any user that has a user profile on the AS/400 can be setup to have a their own area that contains Web content.

The URL-path that specifies a User Directory always begins with /~ followed by a user profile. User Directory URL-paths are always relative to the Public User Directory off of the user's home directory. The Public User Directory is a configuration value that specifies a subdirectory where all personal Web content is stored. Forcing this information into a subdirectory prohibits access by the Web server to anything in the user's home directory outside of their Public User Directory.

User Directories are always enabled, but by default, the Server User Profile does not have *READ authority to any user profile so no one can take advantage of User Directories. To enable User Directories on a person-by-person basis, give the Server User Profile *READ access to the person's user profile. Sign on to the system with a user profile that has *SECADM special authority. Do a WRKOBJ OBJ(WWW/user_profile) OBJTYPE(*USRPRF). Add the Server User Profile to the list of authorized users. Give it *USE authority. You can optionally remove the Execute authority.

In addition, the Server User Profile must have *X (Execute) authority to all directories leading up to the user's home directory. the Server User Profile should have *RX (i.e., *USE) authority to the Public User Directory and all Web documents in the Public User Directory. The *X and *RX authority can be set using the WRKLNK command.

User Directory Example

The browser asks for http://host.name/~joe/schedule.html. The user JOE has his home directory set to /home/joe. The Public User Directory is set to PubHTML. The server would find the HTML document in /home/joe/PubHTML/schedule.html.

In order for this to work, the Server User Profile must have at least *READ authority to the user profile JOE, the Server User Profile must have at least *X authority to /home/joe, and the Server User Profile must have at least *RX authority to PubHTML/schedule.html.