Bug 770609 - df emits strange warning messages about /var/named/chroot
Summary: df emits strange warning messages about /var/named/chroot
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ondrej Vasik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-28 01:03 UTC by Tom Lane
Modified: 2013-07-03 03:40 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-13 20:44:35 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Tom Lane 2011-12-28 01:03:29 UTC
Description of problem:
In Fedora 16, a simple "df" command emits all this on stderr, if bind-chroot is installed:
df: `/var/named/chroot/etc/named': Permission denied
df: `/var/named/chroot/var/named': Permission denied
df: `/var/named/chroot/etc/named.rfc1912.zones': Permission denied
df: `/var/named/chroot/var/named/chroot/etc/named.rfc1912.zones': Permission denied
df: `/var/named/chroot/etc/rndc.key': Permission denied
df: `/var/named/chroot/var/named/chroot/etc/rndc.key': Permission denied
df: `/var/named/chroot/usr/lib64/bind': Permission denied
df: `/var/named/chroot/var/named/chroot/usr/lib64/bind': Permission denied
df: `/var/named/chroot/etc/named.iscdlv.key': Permission denied
df: `/var/named/chroot/var/named/chroot/etc/named.iscdlv.key': Permission denied
df: `/var/named/chroot/etc/named.root.key': Permission denied
df: `/var/named/chroot/var/named/chroot/etc/named.root.key': Permission denied

This is unsightly, at least, and I rather wonder why df is touching those files at all.

Version-Release number of selected component (if applicable):
coreutils-8.12-2.fc16.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Install bind-chroot.  (Not sure if you have to actually start the DNS server, but I have it running.)
2. df
  
Actual results:
lots of errors along with the expected output

Expected results:
no errors

Comment 1 Kamil Dudka 2012-01-03 09:45:53 UTC
> This is unsightly, at least, and I rather wonder why df is touching those files
> at all.

They are probably listed in /etc/mtab and do not classify as dummy file systems.  Please attach the contents of your /etc/mtab.

Comment 2 Adam Tkac 2012-01-03 11:48:47 UTC
When you install bind-chroot, named initscript automatically `mount --bind` non-chroot environment into chroot during service startup. Directories and files like /etc/named, /var/named, /etc/rndc.key are mounted into /var/named/chroot/*

Directories/files which are shown on df's stderr are only readable by root/named user/group which means df cannot get their stats.

I'm not sure what's correct fix for this issue, in my opinion df shoudn't write "permission denied" error when it is unable to get mount point stats.

Comment 3 Adam Tkac 2012-01-03 11:55:20 UTC
This is general problem with all `mount --bind` files, I tried this:

[root@evileye atkac]# dd if=/dev/zero of=file bs=1M count=10
10+0 records in
10+0 records out
10485760 bytes (10 MB) copied, 0.0197064 s, 532 MB/s

[root@evileye atkac]# ll asd/ -d
drwxr-xr-x. 2 root root 4096 Jan  3 12:46 asd/

[root@evileye atkac]# chmod 700 asd/

[root@evileye atkac]# ll file 
-rw-r--r--. 1 root root 10485760 Jan  3 12:50 file

[root@evileye atkac]# mv file asd/

[root@evileye atkac]# chmod 600 asd/file 

[root@evileye atkac]# mkdir asd/asd2

[root@evileye atkac]# chmod 700 asd/asd2/

[root@evileye atkac]# touch asd/asd2/file

[root@evileye atkac]# chmod 600 asd/asd2/file 

[root@evileye atkac]# mount --bind asd/file asd/asd2/file
<CTRL>+D

[atkac@evileye ~]$ df
df: `/home/atkac/asd/asd2/file': Permission denied

Comment 4 Kamil Dudka 2012-01-03 12:34:25 UTC
(In reply to comment #2)
> I'm not sure what's correct fix for this issue, in my opinion df shoudn't write
> "permission denied" error when it is unable to get mount point stats.

Then it would return non-zero exit code without providing any further diagnostic, which does not sound obviously better than status quo.  This bug is triggered by merging /etc/mtab with /proc/mounts and I suspect that df is not the only affected utility by this incompatibility.

The legacy /etc/mtab lists bind mounts with file system type "none" (which is black-listed in df unless the -a option is used) whereas /proc/mounts, which /etc/mtab is nowadays symlinked to, lists bind mounts with the target file system type (such as ext4, etc.).

Comment 5 Tom Lane 2012-01-03 15:27:12 UTC
(In reply to comment #1)
>  Please attach the contents of your /etc/mtab.

Not sure if you still need this, but yes there are matching entries in /etc/mtab:

/dev/mapper/vg_rh3-LogVol02 /var/named/chroot/etc/named ext4 rw,seclabel,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/mapper/vg_rh3-LogVol02 /var/named/chroot/var/named ext4 rw,seclabel,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/mapper/vg_rh3-LogVol02 /var/named/chroot/etc/named.rfc1912.zones ext4 rw,seclabel,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/mapper/vg_rh3-LogVol02 /var/named/chroot/var/named/chroot/etc/named.rfc1912.zones ext4 rw,seclabel,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/mapper/vg_rh3-LogVol02 /var/named/chroot/etc/rndc.key ext4 rw,seclabel,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/mapper/vg_rh3-LogVol02 /var/named/chroot/var/named/chroot/etc/rndc.key ext4 rw,seclabel,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/mapper/vg_rh3-LogVol02 /var/named/chroot/usr/lib64/bind ext4 rw,seclabel,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/mapper/vg_rh3-LogVol02 /var/named/chroot/var/named/chroot/usr/lib64/bind ext4 rw,seclabel,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/mapper/vg_rh3-LogVol02 /var/named/chroot/etc/named.iscdlv.key ext4 rw,seclabel,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/mapper/vg_rh3-LogVol02 /var/named/chroot/var/named/chroot/etc/named.iscdlv.key ext4 rw,seclabel,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/mapper/vg_rh3-LogVol02 /var/named/chroot/etc/named.root.key ext4 rw,seclabel,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/mapper/vg_rh3-LogVol02 /var/named/chroot/var/named/chroot/etc/named.root.key ext4 rw,seclabel,relatime,user_xattr,acl,barrier=1,data=ordered 0 0

I agree with the idea that these do not belong there.

Comment 6 Tom Lane 2012-01-05 16:34:40 UTC
BTW, while I'm whining about this, is there any point in complaining about the duplicate entries for "rootfs" and the volume that is the root filesystem?  For example

Filesystem                   Size  Used Avail Use% Mounted on
rootfs                        49G   11G   36G  23% /
/dev/mapper/vg_rh3-LogVol02   49G   11G   36G  23% /

Personally I could do without all the mostly-fictional entries for tmpfs filesystems, too.

Comment 7 Kamil Dudka 2012-01-05 16:56:59 UTC
(In reply to comment #6)

This is bug 709351.

Comment 8 Fedora End Of Life 2013-01-16 16:45:40 UTC
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 9 Fedora End Of Life 2013-02-13 20:44:38 UTC
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.