Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: rpm
-
Labels:None
-
Environment:linux (fedora and redhat)
-
Number of attachments :
Description
It would be nice if system administrators could set user and group during installation. This could be realized as either
export RUN_AS_USER=application1User
export RUN_AS_GROUP=applicationGroup
or with parameters to the rpm installation command.
My current workaround is:
if [ "$RUN_AS_USER" = "" ]; then
echo Variable RUN_AS_USER not set, defaulting to root.
export RUN_AS_USER=root
fi
echo Changing ownership according to RUN_AS_USER=$RUN_AS_USER
chown -Rc $RUN_AS_USER $RPM_INSTALL_PREFIX
echo chmod ug+x on directories in $RPM_INSTALL_PREFIX
find $RPM_INSTALL_PREFIX -type d -exec chmod -c ug+x {} \;
The variable RUN_AS_USER was chosen because this variable is read by Java Service Wrapper scripts generated with appassembler-maven-plugin.