Issue:
Unable to Update NexOSS from the Web Interface
Troubleshoot:
NexOSS will run as expected when started by the root user. But if NexOSS is started by the root user and then restarted by the user ossadmin, the NexOSS application will not be able to update any files that are owned by the root user. The web interface will appear as expected and the user will be able to navigate all the NexOSS reports, but updates to any files or triggers will not be accepted.
The following text boxes provide examples of how to check the log files to determine if the NexOSS has been started by the root user.
CDRConverter logs at Apr 6 18:27 are owned by user root:
[root@CentOS-5-5 ~]# cd $CDRConverter/log
[root@CentOS-5-5 log~]# ls -l
-rw-rw-r-- 1 ossadmin ossadmin 420139 Apr 6 17:59 CDRConverter-Prepare-CDR.log.2012-04-06-13
-rw-rw-r-- 1 ossadmin ossadmin 10620 Apr 6 17:59 CDRConverter-Forward-CDR.log.2012-04-06-13
-rw-rw-r-- 1 ossadmin ossadmin 32280 Apr 6 17:59 CDRConverter-Export-CDR.log.2012-04-06-13
-rw-rw-r-- 1 ossadmin ossadmin 42696 Apr 6 17:59 CDRConverter-Convert-CDR.log.2012-04-06-13
-rw-r--r-- 1 root root 192267 Apr 6 18:27 CDRConverter-Prepare-CDR.log
-rw-r--r-- 1 root root 14526 Apr 6 18:27 CDRConverter-Export-CDR.log
-rw-r--r-- 1 root root 4860 Apr 6 18:27 CDRConverter-Forward-CDR.log
-rw-r--r-- 1 root root 19608 Apr 6 18:27 CDRConverter-Convert-CDR.log
Files in NexOSS ARCHIVE directory are owned by user root.
[root@CentOS-5-5 ~]# cd $NexOSS_ARCHIVE/LOG
[root@CentOS-5-5 ARCHIVE~]# ls -l
-r--r--r-- 1 ossadmin ossadmin 174177 Apr 6 17:42 127.0.0.1-0201-cdr_2012_04_06__17_17_00.cdr.r
-r--r--r-- 1 ossadmin ossadmin 179067 Apr 6 17:47 127.0.0.1-0201-cdr_2012_04_06__17_22_00.cdr.r
-r--r--r-- 1 ossadmin ossadmin 179375 Apr 6 17:52 127.0.0.1-0201-cdr_2012_04_06__17_27_00.cdr.r
-r--r--r-- 1 root root 178107 Apr 6 17:58 127.0.0.1-0201-cdr_2012_04_06__17_32_00.cdr.r
-r--r--r-- 1 root root 182700 Apr 6 18:01 127.0.0.1-0201-cdr_2012_04_06__17_37_00.cdr.r
Solution:
If files are owned by user root, use the following steps to change file ownership from root to ossadmin.
First, stop the NexOSS application.
[root@CentOS-5-5 ARCHIVE]# cd $NexOSS_HOME/unix/run
[ossadmin@CentOS-5-5 run]# ./stop_NexOSS.sh
Using CATALINA_BASE: /home/ossadmin/OSS/nexoss/WebServer
Using CATALINA_HOME: /home/ossadmin/OSS/nexoss/WebServer
Using CATALINA_TMPDIR: /home/ossadmin/OSS/nexoss/WebServer/temp
Using JAVA_HOME: /home/ossadmin/OSS/nexoss/jdk
....Signaling the application to exit
Waiting for the application to exit . done
Signaling the application to exit
Waiting for the application to exit .... done
Signaling the application to exit
Waiting for the application to exit ... done
Signaling the application to exit
Waiting for the application to exit ..... done
Next, navigate to the OSS directory to change ownership.
[root@CentOS-5-5 OSS]# chown -R ossadmin:ossadmin nexoss