Publishing portlet and development wars for IBM® WebSphere® Application Server and IBM WebSphere Portal servers running on Linux and UNIX environments may cause permission issues.
File permission issues
Both automatic and manual publishing of a development or portlet war are processed by the WebSphere Application Server and WebSphere Portal server. During this publishing process files and folders are created inside of installedApps/
directory. This is where WebSphere Portlet Factory write files to the published war file during the development process. The files get copied over from the Eclipse copy task when a model is saved or when another copy action takes place using a mapped or mounted file system.
If the WebSphere Application Server / WebSphere Portal server is running as the user 'root', then the published files will be owned by the 'root' user. In general, anyone running Eclipse, or writing to the mapped or mounted file system will not be performed as 'root'. This will cause Eclipse errors and the new or updated files will not be correctly written to the published war directory.
While each hardware and software environment will need to be addressed on a case by case basis, you may find these general approaches to be helpful:
- Run your WebSphere Application Server / WebSphere Portal server as a different user than root, and run it as someone who is in the same group as the WebSphere Portlet Factory developer, so that the WebSphere Portlet Factory developer has write permissions.
- Modify the access to the installable and installed applications directory, so that any subfolder created under it is owned by a group that the WebSphere Portlet Factory developer is a member. For example, you could execute these commands for the group "wpfdev":
chgrp wpfdevs installedApps/
chmod g+ws installedApps/
and then make your "wpfdev" user a member of the "wpfdevs" group.
- With WebSphere Application Server running, open the administration console, and navigate to: Application servers -> WebSphere_Portal -> Process Execution
> . Change the umask value to 002. Change the run as group' to wpfDevs Perform the same step for server1. This will allow you to change the file permissions for the portal server. Any file written by the portal server will now have read / write execute permissions for the portal user, and the group to which the portal user belongs.
Parent topic: Overview: publishing and exporting: wpf7