Wednesday 29 August 2018

linux - See history of who all opened a particular file


How can I know who opened a particular file recently but might not have kept it opened at the moment?


Anyone has an idea?



Answer



Well, if you mean in the past, you probably cannot, unless you have some kind of audtiting turned on.


Assuming you do not, you can look at the permissions of the file and the directories to see who has has access. You can grep everyone's .bash_history file for the file name.


And that is about it, as far as I know. If they still have it open, you could use lsof, for instance.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...