Files in Repository Root owned

OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules
Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
Post Reply
farkinid2
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: Tue Jun 20, 2017 4:14 am

Files in Repository Root owned

Post by farkinid2 » Fri Sep 13, 2019 5:46 am

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

jllort
Moderator
Moderator
Posts: 10911
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Files in Repository Root owned

Post by jllort » Sat Sep 14, 2019 6:38 pm

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 )

farkinid2
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: Tue Jun 20, 2017 4:14 am

Re: Files in Repository Root owned

Post by farkinid2 » Wed Sep 18, 2019 6:40 am

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.

Post Reply