]> granicus.if.org Git - ejabberd/commitdiff
Change directory before any operation to one readable by INSTALLUSER (EJAB-1322)
authorPeter Lemenkov <lemenkov@gmail.com>
Thu, 18 Mar 2010 11:57:21 +0000 (14:57 +0300)
committerBadlop <badlop@process-one.net>
Mon, 18 Oct 2010 23:05:31 +0000 (01:05 +0200)
This is required in order to suppress error messages like
"File operation error: eacces" when ejabberd was started from directory,
which is not readable by INSTALLUSER (/root, for example). See rhbz #564686:

https://bugzilla.redhat.com/564686

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
src/ejabberdctl.template

index fecdecc86ff51ffacac0ca9b51027f742ab6d025..67eafbfb87663c155179f9c62d6015977825c124 100644 (file)
@@ -114,6 +114,10 @@ HOME=$SPOOLDIR
 # create the home dir with the proper user if doesn't exist, because it stores cookie file
 [ -d $HOME ] || $EXEC_CMD "mkdir -p $HOME"
 
+# Change to a directory readable by INSTALLUSER to
+# prevent "File operation error: eacces." messages
+cd $HOME
+
 # export global variables
 export EJABBERD_CONFIG_PATH
 export EJABBERD_MSGS_PATH