Topic #1 : How to change Ephesoft Transact to run as non-root when it was installed to run under the root user.
Applicable Ephesoft versions: 188.8.131.52
These instructions will help you configure Ephesoft to run as a non-root user. For the example below, we are using the ephesoft user which we have already created and given sudo rights. Sudo rights are required for the user under which Ephesoft will be running. The epehsoft user will not be able to start ephesoft using the service, but will instead need to be started with the sh file.
More Info: When making these changes, if you have SharedFolders, you will have to make the chown and chmod changes to the SharedFolders also. For this sample, I’m assuming that /SharedFolders is the location of the mount of the SharedFolders mount. This may also have to be done on the shared folders host server/NAS. If the SharedFolders are hosted under the /opt/Ephesoft/SharedFolders, then step 5 is not necessary in the instructions below.
- stop Ephesoft
# sudo service ephesoft stop
- switch to root user
- Verify ephesoft user is correct:
# cat /etc/passwd | grep ephesoft
- Change permissions for Ephesoft folder and /etc/.java which is where we hold the license
# chown -R ephesoft:ephesoft /opt/Ephesoft
# chmod -R u+rX /opt/Ephesoft
# chown -R ephesoft:ephesoft /etc/.java
# chmod -R u+r /etc/.java
- Change Permissions for the SharedFolders
# chown -R ephesoft:ephesoft /SharedFolders
# chmod -R u+r/SharedFolders
- Change the user in the /opt/Ephesoft/JavaAppServer/bin/shutdown.sh
# sed -i ‘s/application_user=root/application_user=ephesoft/g’ /opt/Ephesoft/JavaAppServer/bin/shutdown.sh
- Change the user in the /opt/Ephesoft/JavaAppServer/bin/startup.sh
# sed -i ‘s/application_user=root/application_user=ephesoft/g’ /opt/Ephesoft/JavaAppServer/bin/startup.sh
- Change user to ephesoft
# su ephesoft
- Start Ephesoft as user ephesoft