LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-22-2007, 09:24 AM   #1
Supernoobs
LQ Newbie
 
Registered: Jun 2005
Distribution: Debian
Posts: 7

Rep: Reputation: 0
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!
 
Old 01-23-2007, 04:37 AM   #2
zulfilee
Member
 
Registered: Apr 2004
Location: India
Distribution: Redhat,Fedora
Posts: 430

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

- zulfi
 
Old 01-23-2007, 05:39 AM   #3
Supernoobs
LQ Newbie
 
Registered: Jun 2005
Distribution: Debian
Posts: 7

Original Poster
Rep: Reputation: 0
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...
 
Old 01-23-2007, 05:52 AM   #4
zulfilee
Member
 
Registered: Apr 2004
Location: India
Distribution: Redhat,Fedora
Posts: 430

Rep: Reputation: 39
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
 
  


Reply

Tags
vsftpd



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Harddisk Space Problem just_a_kid Solaris / OpenSolaris 1 12-20-2006 12:38 AM
Harddisk space hammam12 Linux - Software 5 06-19-2006 12:03 PM
my harddisk is run out space ,what should i do . ztdep Linux - Software 7 08-05-2005 03:16 AM
Low Harddisk space. Can I just transfer the entire Linux to a bigger harddisk? davidas Linux - Newbie 12 04-13-2004 02:03 AM
Remaining space on harddisk WiWa Linux - General 4 10-19-2003 09:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration