0

I need to solve a task with a script. I moving files from a user home directory to another storage regularly (in every 5 minutes and so).

How can I detect if this user is logged in (via VSFTPd server) in which case I do not do the move?

Thanks

1 Answer 1

0

Setting setproctitle_enable=YES in your vsftpd.conf file will toggle the display of session information in the process name:

ftpsecu+ 27496 27479  4 13:16 ?        00:00:00 vsftpd: 2.2.2.2: connected
username 27500 27496  0 13:16 ?        00:00:00 vsftpd: 2.2.2.2/username: IDLE

When set to NO (the default), the UID of child processes handling the connection should still be that of your connected user in your case:

ftpsecu+ 27525 27524  1 13:19 ?        00:00:00 /usr/bin/vsftpd
username 27529 27525  0 13:19 ?        00:00:00 /usr/bin/vsftpd

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .