Could not Write to the Configuration Directory – OpenAM

Could not Write to the Configuration Directory – Resolution :

If the user running the web container has a $HOME directory, then the configuration directory is stored there, and you probably do not have this problem. If you do not know the user running the web container, use the pscommand to check. In the following example, the user is mark, the web container tomcat.

1
2
$ ps -ef | grep tomcat
mark      1739     1  0 14:47...

For a container installed from native packages with a dedicated user, $HOME may not be where you think it is. Look at the user’s entry in /etc/passwd to locate the home directory. The user running the web container where you install OpenAM must be able to read from and write in this directory.

If you cannot change the permissions to the user’s home directory, you can, as a workaround, unpack openam-server-10.2.0-SNAPSHOT.war, set the configuration.dir property in the WEB-INF/classes/bootstrap.properties to a directory with appropriate permissions, and repack openam.war with the adjusted file before deploying that.

1
2
3
4
5
6
7
$ cd ~/Downloads/openam/openam-server-10.2.0-SNAPSHOT.war
$ mkdir unpacked ; cd unpacked
$ jar xf ../openam-server-10.2.0-SNAPSHOT.war
$ vi WEB-INF/classes/bootstrap.properties
$ grep ^config WEB-INF/classes/bootstrap.properties
configuration.dir=/my/readwrite/config/dir
$ jar cf ../openam.war *

Leave a Reply

Your email address will not be published. Required fields are marked *