Re: How to find busy files when you are _not_ root

Stephen Frost (sfrost@ns.snowman.net)
Fri, 12 Nov 1999 17:42:57 -0500 (EST)


On Fri, 12 Nov 1999, Dietmar Kling wrote:

> Situation:
> Some people upload Files in a certain Directory of a ftp server.
> Some of the ftp jobs are very slow.
> I have to write a daemon which collects the files which are uploaded
> (assumption the transfer alway succeeds - OK thats another topic).
> Problem: Sometimes i process files, which are not uploaded (at this
> time).
>
> But I cannot determine which files are still open,
> (different userids of all users).
>
> I was adviced to use lsof or fuser but this _only_ gives me a
> complete listing of all busy (open) files when i am _root_.
>
> Is there another way (kernel function?) which allows my
> (not root) daemon to determine if the files are busy ?

Just a quick thought, teach lsof about groups and have processes
able to have what group they have associated w/ them? Maybe that's
possible via /proc already? I dunno, I'm asking.

Stephen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/