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 viaForceCommand internal-sftp
in aMatch
block insshd_config
. We would have to write a wrapper script to allowsftp-server
andquota
. - 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.