public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Andre Noll <maan@systemlinux.org>
Cc: "André C. Stiel" <andre.stiel@tuebingen.mpg.de>, xfs@oss.sgi.com
Subject: Re: display project quota as user
Date: Thu, 15 Mar 2012 10:31:27 +1100	[thread overview]
Message-ID: <20120314233127.GL5091@dastard> (raw)
In-Reply-To: <20120314130902.GA26508@systemlinux.org>

On Wed, Mar 14, 2012 at 02:09:02PM +0100, Andre Noll wrote:
> Simple question: Can non-privileged users display XFS project quotas?
> 
> Currently the command
> 
> 	xfs_quota -c 'quota -p 42'
> 
> fails when executed as a non-root user due to quotactl(Q_XGETQUOTA,...)
> returning EPERM. The problem seems to be that fs/quota/quota.c has no
> knowledge of project quotas at all.

Right - only XFS supports project quotas.

> The proof-of-concept patch below makes quotactl(Q_XGETQUOTA,...)
> succeed for any user when called with type == XQM_PRJQUOTA. However,
> relaxing the permission checks like this might not please everybody,
> changes semantics of an existing API and adds the XFS specific constant
> XQM_PRJQUOTA to fs/quota.c. So I'm not even asking to apply something
> like that.
> 
> Is there a better way to allow users to display project quotas?

There is no user <=> projid mapping that exists, so either the
information is available to everyone, or it is available only to
root. In this case, system wide quota reports are limited to root,
and I don't see that changing.

If you really must allow users to see project quota limits, then
write a simple wrapper program and allow only the users that need
the infomration to execute it via sudo....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2012-03-14 23:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-14 13:09 display project quota as user Andre Noll
2012-03-14 23:31 ` Dave Chinner [this message]
2012-03-15  8:01   ` Andre Noll

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120314233127.GL5091@dastard \
    --to=david@fromorbit.com \
    --cc=andre.stiel@tuebingen.mpg.de \
    --cc=maan@systemlinux.org \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox