Koozali.org: home of the SME Server

Legacy Forums => General Discussion (Legacy) => Topic started by: wingman on December 22, 2004, 10:13:20 PM

Title: Contrib for viewing which users are accessing which files?
Post by: wingman on December 22, 2004, 10:13:20 PM
Does anyone know of a contrib that will allow me to see which files are being accessed by which users? I need something similar to the utility in Windows that will give me the file name and user name, preferably sorted by user.

Thanks
Title: Contrib for viewing which users are accessing which files?
Post by: mbachmann on December 23, 2004, 08:33:13 AM
No contrib which will do that but the console command
Code: [Select]
lsof will do what you desire if you hit the right switches.
Title: Contrib for viewing which users are accessing which files?
Post by: wingman on December 23, 2004, 02:43:49 PM
Thanks for your response. This would work, except that for any file within a folder shared to everyone on my network, it shows that the user "root" has them open, not the actual user who is using that file.
I have read up on all the switches, and don't see what I am doing wrong.
I am using this command:
lsof +D /home/e-smith/files/ibays/<shared folder name>, which causes lsof to traverse the named folder and all subfolders and files. Just what I want it to do, but I need to know who is actually accessing the file...and it isn't root, which is what lsof returns.
Any other ideas?

Thanks
Joe Burkhead
Title: Contrib for viewing which users are accessing which files?
Post by: Anonymous on December 23, 2004, 02:49:22 PM
I'm sure there is a better solution but as a last resort you could look at the logs to see when someone was logged on and the files that were accessed at that time. :-o
Title: Contrib for viewing which users are accessing which files?
Post by: wingman on December 23, 2004, 02:57:55 PM
Thanks, but that isn't why I need to see who has the file in use. I need it in real-time. In our office (we prepare income tax returns) I need to be able to easily and quickly see who is in the program when we need to apply an update so that I can make sure that they are all out of it before proceeding with the update. We have a rather large office, and going around and physically checking is not a good option.

Joe
Title: Contrib for viewing which users are accessing which files?
Post by: Anonymous on December 23, 2004, 03:31:44 PM
Quote from: "wingman"
... I need to be able to easily and quickly see who is in the program  ...  make sure that they are all out of it  ... large office, and going around and physically checking is not a good option.
Joe


Do you have an IM system?  You can broadcast a message telling everyone to close the program.
Title: Contrib for viewing which users are accessing which files?
Post by: wingman on December 23, 2004, 03:54:10 PM
.....and if someone is not in their office at the time? Then the program is still open on their machine, and the updates cannot be applied.

Please don't flame me, but this is soooo easy to see on a Windows server. Isn't there a way on SME??

Joe
Title: Contrib for viewing which users are accessing which files?
Post by: mdo on December 23, 2004, 06:55:32 PM
Try "smbstatus" on the server console (or through putty), maybe that's what you want?

Regards,
Michael
Title: Contrib for viewing which users are accessing which files?
Post by: wingman on December 23, 2004, 07:19:47 PM
Thanks, Michael. That will give me what I need!

I just love SME. Wish I knew as much as some of you gurus!

Joe