unable to list current users logged in via SFTP client
HI
I have an SFTP server running on a Debian box, used for clients to upload data and other files to us. I've got a script running which picks up those files and delivers them to a windows server share for the office staff to pick up. My problem is this:
I'd like to add a little routine in the script to check whether the client is currently logged in (so potentially in the process of uploading files) before moving said files away and risking grabbing one that hasn't been completely transfered. I tried doing it with the following lines in my script:
which would work in theory, but when this particular client connects, for some reason I don't get him listed in the output from ps. I see his login in auth.log, but he doesn't spawn a "username"@notty process or anything. Now I've connected as this user (using filezilla from another machine) and checked that I definitely do show up in ps, so it may be something peculiar about the software they're using (SecureCRT form a windows box AFAIK)
Just wondering if anyone can suggest a way to resolve this, or another way to check for a current connection from this user (using his IP or something?)