Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Austin S Hemmelgarn <ahferroin7@gmail.com>
To: Chris Murphy <lists@colorremedies.com>
Cc: Qu Wenruo <quwenruo@cn.fujitsu.com>,
	Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: btrfs-progs 4.0 breaks btrfs fi show?
Date: Wed, 06 May 2015 13:32:02 -0400	[thread overview]
Message-ID: <554A5012.1090801@gmail.com> (raw)
In-Reply-To: <CAJCQCtRjWYgGJkKp0jOsb31cqjyh00K2tV-wbJqnSAYC3ekcMg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1322 bytes --]

On 2015-05-06 13:05, Chris Murphy wrote:
> Ok so now that my mea culpa is out of the way, I'm actually wondering
> why non-root users can't do certain btrfs tasks when they're read-only
> commands.
>
> [chris@f22m ~]$ btrfs fi show
> ERROR: could not open /dev/sda7   ##this is new it wasn't doing this last night
> btrfs-progs v4.0
> [chris@f22m ~]$ btrfs fi df /
> Data, single: total=4.00GiB, used=3.57GiB
> System, single: total=4.00MiB, used=16.00KiB
> Metadata, single: total=1.01GiB, used=198.30MiB
> GlobalReserve, single: total=80.00MiB, used=0.00B
> [chris@f22m ~]$ btrfs fi usage /
> WARNING: can't read detailed chunk info, RAID5/6 numbers will be
> incorrect, run as root
> WARNING: can't get filesystem info from ioctl(FS_INFO), run as root
> ERROR: couldn't get space info on '/' - Operation not permitted
>
>
> I think usage is more useful than df for users, and contains largely
> the same information as df + show, so I think all three should be
> non-root user usable.
>
That may be tricky to do, I think show and usage both access the 
underlying block device directly (or try to in any case), which would 
explain why they don't work as non-root; most modern linux distributions 
have permissions on (non-hot-plugged) block devices set to 660 and owned 
by root:disk.



[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 2967 bytes --]

  reply	other threads:[~2015-05-06 17:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-06  7:23 btrfs-progs 4.0 breaks btrfs fi show? Chris Murphy
2015-05-06  8:12 ` Qu Wenruo
2015-05-06  8:34   ` Anand Jain
2015-05-06 15:07     ` David Sterba
2015-05-06 15:27       ` David Sterba
     [not found]   ` <CAJCQCtT0ff8fVrMQ7rrgW1VFkiBL+f_upGOUZ7DY65N62jAsBQ@mail.gmail.com>
2015-05-06  9:31     ` Qu Wenruo
2015-05-06 15:52       ` Chris Murphy
2015-05-06 17:05         ` Chris Murphy
2015-05-06 17:32           ` Austin S Hemmelgarn [this message]
2015-05-06 17:48             ` Hugo Mills
2015-05-07 14:14           ` David Sterba

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=554A5012.1090801@gmail.com \
    --to=ahferroin7@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lists@colorremedies.com \
    --cc=quwenruo@cn.fujitsu.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