Recommended way to check user activity?

Hi all

Regardless of which version of ownCloud server one is running and which db, what is the suggested way to check user’s activity? For example how does one answer the question “what is the last time user X changed any of their files?”

The official documentation refers to occ commands, but these are not very useful, because they track the web interface logins. Also what I see in the database table oc_accounts seems only related to users actively logging in via the web interface.

I have lots of users using the client on various platforms. So far I’ve only been looking into the logfiles to find such clues. The client does not access via the web interface but uses the API therefore every operation is performed using an obtained access token. The last web login is quite useless in this case, unfortunately.

The question is, is there any place in the db where I can find when was the last action by user X performed? Otherwise I guess I continue scanning owncloud.log, but it’s quite annoying if a user hasn’t been active for long time. Means you need to scan more and more tarballed logs.

Any tip what would be the best to grep for or any good way to scan these log files? they seem to be json formatted, I could write my own parser, but maybe someone has already good ideas.

Thanks for you answers and the developers for the awesome product!


Hello Florido,

can you explain what do you need this info for?

I would recommend the admin audit app which tracks every action of every user, and filter that log with the user name.

You could also use the impersonate app and check every user one by one.

If it’s storage space you want to save - you could just implement quotas, and adjust them according to the users needs.

1 Like

Hi Dmitry,

Thanks for your answer!

can you explain what do you need this info for?

I can give you a few reasons why we would like this kind of monitoring to be machine-managed

  1. If for some reason the user forgets to run the sync client, we can send a warning after a defined timeslot – it may even vary by user eventually, depending on their usage patterns.

  2. We would like to assess what was the last sync attempt for certain users. It could be that they just don’t use the client that often. This is useful if a user is flagged for removal (maybe because he changed activity in the organization or he stopped working) if they have shared folders to give an indication to their collaborators about how old the files are.

  3. Some user X has shared folders/files but we suspect these are not needed anymore. For those who are shared directly to other users Y, we would like to understand what was the last time Y used those files and eventually suggest them some persistent way of sharing (e.g. a group folder)

I would recommend the admin audit app which tracks every action of every user, and filter that log with the user name.

Thanks for the tip, I must admit we lag much behind with deployment, we still run 10.5 and I see an Auditing app in the market which we do not have installed, but looking at the description honestly I do not see the difference from extrapolating such info from the current owncloud.log entries.
Also, I see the app is bound to the commercial license, but we currently still run the community version with AGPL modules. The future of this setup is not clear as I write so I am just trying to make the most out of it with the little we have.

My question was more whether such information is stored in the db or in logs only, the more I look at the db the more I understand this seems to be logs only.


Hi again

I take back what I wrote. I think the table


contains a good portion of the info I was looking for.