Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1555697
| From | Konstantin Khlebnikov <khlebnikov@yandex-team.ru> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] ovl: do not ignore disk quota if current task is not privileged |
| Date | 2017-01-10 17:50 +0100 |
| Message-ID | <sY7Mt-3II-25@gated-at.bofh.it> (permalink) |
| References | <sY2Wt-JF-3@gated-at.bofh.it> <sY79L-3vB-11@gated-at.bofh.it> <sY7CO-3Fl-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 10.01.2017 19:35, Vivek Goyal wrote: > On Tue, Jan 10, 2017 at 11:06:47AM -0500, Vivek Goyal wrote: >> On Tue, Jan 10, 2017 at 02:26:48PM +0300, Konstantin Khlebnikov wrote: >>> If overlay was mounted by root then quota set for upper layer does not work >>> because overlay now always use mounter's credentials for operations. >>> >> >> Hi Konstantin, >> >> So CAP_SYS_RESOURCE bypasses the quota checks? >> >> I just created dir upper on xfs filesystem and defined quota of 1G and >> as root user (with cap_sys_resoureces), I am not able to create file >> bigger than 1g in that dir. So looks like xfs quota took affect even >> for privileged user with CAP_SYS_RESOURCE set. >> >> What am I missing? > > As root user, I set limit of 1G on work/ and upper/ dir and created > a file of 4G in lower/ dir and mounted overlay on "merged" dir and > did "touch zerofile", and go error message. > > touch: cannot touch 'zerofile': No space left on device > > So looks like I am doing something wrong and not be able to reproduce > the issue to begin with. > I'm using ext4 project quota around upper/work directories. ext4 use generic quota implementation: it ignores hard limits if CAP_SYS_RESOURCE is set. It seems XFS ignores CAP_SYS_RESOURCE for any kind of quota. But I've found special meaning for CAP_FOWNER - chown() can ignore user/group quota if caller have this capability. -- Konstantin
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] ovl: do not ignore disk quota if current task is not privileged Konstantin Khlebnikov <khlebnikov@yandex-team.ru> - 2017-01-10 12:40 +0100
Re: [PATCH] ovl: do not ignore disk quota if current task is not privileged Vivek Goyal <vgoyal@redhat.com> - 2017-01-10 15:50 +0100
Re: [PATCH] ovl: do not ignore disk quota if current task is not privileged Miklos Szeredi <miklos@szeredi.hu> - 2017-01-10 17:00 +0100
Re: [PATCH] ovl: do not ignore disk quota if current task is not privileged Konstantin Khlebnikov <khlebnikov@yandex-team.ru> - 2017-01-10 17:40 +0100
Re: [PATCH] ovl: do not ignore disk quota if current task is not privileged Amir Goldstein <amir73il@gmail.com> - 2017-01-10 19:20 +0100
Re: [PATCH] ovl: do not ignore disk quota if current task is not privileged Konstantin Khlebnikov <khlebnikov@yandex-team.ru> - 2017-01-10 19:40 +0100
Re: [PATCH] ovl: do not ignore disk quota if current task is not privileged Vivek Goyal <vgoyal@redhat.com> - 2017-01-10 17:10 +0100
Re: [PATCH] ovl: do not ignore disk quota if current task is not privileged Vivek Goyal <vgoyal@redhat.com> - 2017-01-10 17:40 +0100
Re: [PATCH] ovl: do not ignore disk quota if current task is not privileged Konstantin Khlebnikov <khlebnikov@yandex-team.ru> - 2017-01-10 17:50 +0100
Re: [PATCH] ovl: do not ignore disk quota if current task is not privileged Konstantin Khlebnikov <khlebnikov@yandex-team.ru> - 2017-01-10 17:40 +0100
[PATCH v2] ovl: drop CAP_SYS_RESOURCE from saved mounter's credentials Konstantin Khlebnikov <khlebnikov@yandex-team.ru> - 2017-01-10 19:40 +0100
Re: [PATCH v2] ovl: drop CAP_SYS_RESOURCE from saved mounter's credentials Vivek Goyal <vgoyal@redhat.com> - 2017-01-10 20:20 +0100
csiph-web