Operating System - HP-UX
1753810 Members
8171 Online
108805 Solutions
New Discussion юеВ

Re: how to find out access of files and directory by users

 
SOLVED
Go to solution
Shivkumar
Super Advisor

how to find out access of files and directory by users

dear sirs,

is there a way to find out, a particular file or directory is being accessed by how many users ?

or which user is accessing the files or directories ?

thanks,
shiv
11 REPLIES 11
RAC_1
Honored Contributor

Re: how to find out access of files and directory by users

ll -c -> chnage time
ll -u -> access time
ll -t -> modification time

but you won't get who accesses it.
There is no substitute to HARDWORK
Devender Khatana
Honored Contributor

Re: how to find out access of files and directory by users

Hi,

You can access the timestamp of various accesses using ll but not the usernames who has done that.

HTH,
Devender
Impossible itself mentions "I m possible"
Yogeeraj_1
Honored Contributor

Re: how to find out access of files and directory by users

hi,

you cannot do this unless you use third party tools.

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Yogeeraj_1
Honored Contributor

Re: how to find out access of files and directory by users

hi,

you cannot do this unless you use third party tools.



kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Arunvijai_4
Honored Contributor
Solution

Re: how to find out access of files and directory by users

Hi Shiv,

You mean to say, how many users accessed a file "x" by given time, just like "hit rate"? I dont think it is possible to find out unless or untill you use custom softwares.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Zigor Buruaga
Esteemed Contributor

Re: how to find out access of files and directory by users

Hi,

In addition, if you want to "audit" the usage of some files or directories, you may want to take a look at HIDS, free HP Host Intrusion Detection System. I'm using an old version of HIDS to be warned about any modification under /etc/rc.config.d/*, /etc/passwd, /etc/group, etc. You can use it to monitor the access on your files. It will tell you what user did what and when.

Hope this helps.
Regards,
Zigor
Arunvijai_4
Honored Contributor

Re: how to find out access of files and directory by users

Hi Shiv,

You can use tools like Tripwire to audit files and directories accessed by any users.

http://sourceforge.net/projects/tripwire/

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Muthukumar_5
Honored Contributor

Re: how to find out access of files and directory by users

3 ways as,

1) Converting your system to trusted one
2) Enabling HISTORY Logging
3) Writing SHELL wrappers to all system binaries to log into log file.

--
Muthu
Easy to suggest when don't know about the problem!
Arturo Galbiati
Esteemed Contributor

Re: how to find out access of files and directory by users

Hi Shiv,
to see who are using a file now type:
fuser -a

man fuser for other info.

You can write a script which perform fuser evry x time.

HTH,
Art