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
> 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.
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.
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
(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.).
(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.
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.
(In reply to comment #6) This is bug 709351.
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
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.