Recently I encountered a lack of diskspace problem on a SFTP server and I realised I have no idea how to check how much is left or even the total amount.

Does anyone know how to do this through an application like FileZilla or perhaps there is a command that can be used for this purpose?

Note that the server is hosted at a third party and I was hoping there was a way to answer this question without going through them.

Update:

I tried connecting via shell using both putty and cygwin ssh. Putty silently failed while cygwin gave me the following error message:

$ ssh [user]@[host] -i "[priv.key]"
Last login: Wed Aug 17 12:54:46 2011 from 195.204.103.176
Could not chdir to home directory /local00/ftproot/[user]: No such file or directory
/usr/local/sbin/scponlyc: No such file or directory
Connection to [host] closed.

Any ideas?

link|improve this question
Do you have shell access to the server? – SvenW Aug 17 '11 at 8:51
I tried connecting through PuTTy and SSH using the same user, host and private key but just as the authentication process starts the window closes. I'm not sure how to interpret this whether or not authentication failed or if i don't have shell access.. I can connect with the same login with FileZilla – kjetilh Aug 17 '11 at 10:26
Please see my updated question – kjetilh Aug 17 '11 at 11:02
1  
Well, as answered by mailq in this case you're done : there's no way to check in a scponly environment. – François Feugeas Aug 17 '11 at 13:24
ok, thanks for the answer – kjetilh Aug 17 '11 at 13:30
feedback

2 Answers

ssh <host> df -h

Will give you all of the necessary information, in the absence of things like disk quotas. If you don't have shell access (or some way of running commands, such as via PHP exec), then you can't check disk space, but then again, if you don't have shell, how can it be your responsibility to administer the server and manage disk space?

link|improve this answer
Well, it's not strictly my responsibility, but I've written some exporting/importing scripts regarding the SFTP server and I'm notified of the errors triggered. Ultimately we would like to adjust/rewrite the cleanup process but now I just want some more information – kjetilh Aug 17 '11 at 10:30
feedback

With the SFTP command set there is no possibility to get the available size or the space used.

If you are able to SSH to the server (same host, user, password) you could issue a df -h to see the space available. Or a du -h in the folder to see the used space of the folder.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.