xfs
[Top] [All Lists]

quota permissions

To: linux-xfs@xxxxxxxxxxx
Subject: quota permissions
From: Ethan Benson <erbenson@xxxxxxxxxx>
Date: Sun, 24 Mar 2002 04:32:03 -0900
Mail-copies-to: nobody
Mail-followup-to: linux-xfs@xxxxxxxxxxx
Sender: owner-linux-xfs@xxxxxxxxxxx
User-agent: Mutt/1.2.5i
I started testing quotas on XFS and found that users cannot find out
what thier quota is set to, this is normally found by running the
quota command, under 2.2 kernels (this is the first time ive used
quota under 2.4) quota details are printed for any filesystems which
they have files, with 2.4 and XFS (2.4.18) quota always reports that
they have no quotas.

strace shows that this appears to be due to the quota syscalls
returning EPERM:

eb@ash ~$ quota
Disk quotas for user eb (uid 1000): none
eb@ash ~$ quota -u eb
Disk quotas for user eb (uid 1000): none
eb@ash ~$ sudo quota -u eb
Disk quotas for user eb (uid 1000): 
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
      /dev/hda9       0   20480   25600               1    6000    8000        
eb@ash ~$ 

strace reveals:

quotactl(0x5805 /* Q_??? */|USRQUOTA, "/dev/hda9", 0, {16777219, 0, 0, 131, 0, 
7, 5, 0}) = 0
stat64(0x10024f88, 0x100274d0)          = 0
quotactl(0x5805 /* Q_??? */|USRQUOTA, "/dev/hda9", 0, {16777219, 0, 0, 131, 0, 
7, 5, 0}) = 0
geteuid()                               = 1000
quotactl(0x5803 /* Q_??? */|USRQUOTA, "/dev/hda9", 1000, {2147481280, 
805354732, 805463848, 2147481248, 2147481296, 805354732, 2147481280, 
267568876}) = -1 EPERM (Operation not permitted)

I used the split patches, the following were applied:
xfs-2.4.18-split-only.bz2
xfs-2.4.18-split-xattr.bz2
xfs-2.4.18-split-quota32.bz2
xfs-2.4.18-split-kernel.bz2
xfs-2.4.18-split-misc.bz2
xfs-2.4.18-split-acl-dmapi.bz2

as a sidenote, this is probably a quota userland bug, but edquota
refused to work initially after activating quotas (i unmounted and
remounted the filesystem with the quota mountopt) i had to use edquota
-F xfs -u user for the first time, after this it seems to figure out
the format without -F.  im using quota 3.0.4-1 from debian woody.

-- 
Ethan Benson
http://www.alaska.net/~erbenson/

Attachment: pgpJvh85SOtis.pgp
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>