Page 1 of 1

Files in Repository Root owned

PostPosted:Fri Sep 13, 2019 5:46 am
by farkinid2
Hi there,

I deployed OpenKM 6.3.2 community last year in my office. It is running on Ubuntu 18.04 server.

Today I received some reports from users asking why they could not download some files from the repository. When I went in to check, the logs showed that openkm could not find those files which the users could not download. It was a javaio file not found with the path to the file.

When I looked in the repository I could find the file but the ownership of the file was changed to root:root. This made it invisible to openkm. Upon changing the ownership of the file to openkm:openkm the user could operate on the file as per normal.

However there are many more files with this issue. How did these files when uploaded get their ownership set to root:root? I'm completely stumped

Re: Files in Repository Root owned

PostPosted:Sat Sep 14, 2019 6:38 pm
by jllort
That happened because in some moment the application was started by root. Then all the files ( logs ) and new files added in the repository are created and updated by the user who started the application. Usually happens when started the application from the terminal with ./bin/catalina.sh or ./bin/start.sh scripts

Replace all the owner in the whole tomcat :
Code: Select all
chown openkm:openkm -R tomcat-XXXX
And ensure in future you start and stop openkm with service ( what might use openkm user either root )

Re: Files in Repository Root owned

PostPosted:Wed Sep 18, 2019 6:40 am
by farkinid2
Hi jllort

Thanks for the reply. So I will proceed to chown the entire repository to openkm:openkm

As for the start and stop of the openkm service, I already have a systemd file with user and group set to openkm. But you might be right about the catalina.sh start or stop because a colleague was making some changes to the system. I will monitor and see.