Bug 2992 - quota-support for statvfs@openssh.com extension in sftp-server
Summary: quota-support for statvfs@openssh.com extension in sftp-server
Status: NEW
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sftp-server (show other bugs)
Version: -current
Hardware: ix86 Linux
: P5 enhancement
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-11 18:59 AEST by Anders Henke
Modified: 2019-04-11 18:59 AEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Henke 2019-04-11 18:59:42 AEST
Since OpenSSH 5.1, OpenSSH's sftp-server does support a openssh-specific extension to query for file system statistics (#1399). This feature is nice for users accessing their own filesystem (e.g. user's home is located on a distinct, size-limited ZFS filesystem).

There are also many other cases (CDN push zones, file or web hosting) where the user is hosted on a shared, quota-enabled filesystem (UFS/FFS, NFS, EXT3/4, XFS,…) and so this information is less meaningful to the user and may easily result in mis-assumptions.

For example, a user might assume sftp's "df" output represents information not on the actual filesystem, but on their specific own account: they'd either spot plenty of space available (even though they might be running short on quota) or wonder why their almost-empty account is consuming terabytes of space, assuming "some malware" or "being hacked".

I do suggest an option to configure the behavior of the sftp-server's statvfs-extension:
- report statvfs information (default, current behavior)
- report current user's (soft) user quota usage and limits
- report current user's (soft) group quota usage and limits

Introducing such an option enables a system administrator to configure sftp-server according to the specific storage subsystem and the system's configuration. By doing so, the statfs-extension becomes much more useful to sftp users accessing shared, quota-enabled filesystems.