On client C, a directory from server S is mounted via SSHFS (authenticated as user U). The relevant filesystem on S has a quota set. How can a user on C see her quota? The quota command run on C displays nothing. Is there a way to make it work? S uses XFS, if that makes any difference.

Ideas for workarounds:

  • SSH into S as U and run the quota command there. Problem is, U should not be allowed shell access to S. This is currently implemented via ForceCommand internal-sftp in a Match block in sshd_config. We would have to write a wrapper script to allow sftp-server and quota.
  • Let a CRON job on S regularly run quota for each user and put the result in a file in their home directory, e.g., ~/.quota. Pro: SSHD config stays tidy; con: more load on the server, no real-time info for users.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.