LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   vsftpd show harddisk space? (https://www.linuxquestions.org/questions/linux-server-73/vsftpd-show-harddisk-space-521706/)

Supernoobs 01-22-2007 09:24 AM

vsftpd show harddisk space?
 
Hey guys,

just a small question; I would like to show the remaining harddisk space left on my ftp server when logging in or when changing directory. I tried doing it with the dir_message in the vsftpd.conf, but I don't know how I should make it execute the df -h command. Any help?

Thanks!

zulfilee 01-23-2007 04:37 AM

You cannot execute system command like df from a ftp command line.
That is not a secure way too.

- zulfi

Supernoobs 01-23-2007 05:39 AM

thanks for your reply. I did not mean to execute the command from the ftp command line, but to have vsftp execute it when using the dirmessage. I could do it with a cron to write a text file with the harddisk space left every hour or so...

zulfilee 01-23-2007 05:52 AM

Ok got it.

Can u try this .. In the user home directory put a file ".message" which contains the output of "df -h" .

When you login using that username you will get the content of file .message.

As you said you can configure a cron job that put the df output every hour.

The displayis working, but works only on the first entry into that directory.

- zulfi


All times are GMT -5. The time now is 11:30 AM.