Bug 212309 - /usr/local/bin doesn't mount automatically during a system boot
/usr/local/bin doesn't mount automatically during a system boot
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2006-10-26 02:35 EDT by Fred New
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-10-26 09:20:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Fred New 2006-10-26 02:35:03 EDT
Description of problem:
I have a file system that should mount on /usr/local/bin whenever I boot; it

Version-Release number of selected component (if applicable):

How reproducible:  always

Steps to Reproduce:
1. Set up a file system to mount on /usr/local/bin
2. With the file system unmounted,
   restorecon /usr/local/bin
3. Put entry in /etc/fstab so the system should mount it automatically:
LABEL=/usr/local/bin    /usr/local/bin          ext3    defaults        1 2
(Installing FC6 set this up for me.)
4. Reboot
Actual results:
During boot a message appears stating that the file system is read only and
can't be mounted.  After the system has finished booting,
     mount /usr/local/bin
works successfully.

I don't see any avc messages indicating that SELinux had anything to do with
this problem.  But as you can see below in "Additional info", SELinux is involved.

Expected results:
The file system should mount automatically during the boot process.

Additional info:

$ ls -Zd /usr/local/bin
drwxr-xr-x  root root system_u:object_r:bin_t          /usr/local/bin

WORKAROUND:  I can get the file system to mount at boot time if I change the
type setting to match other mount points:
chcon -t file_t /usr/local/bin

Am I being stupid?  Maybe I shouldn't be using /usr/local/bin as a mount point.
 This directory only contains a few scripts I've written, and I just like to
save them during system re-installation.  That is, this is one of the file
systems I don't format when I install the next version of Fedora Core.
Comment 1 Daniel Walsh 2006-10-26 09:20:29 EDT
You should not have any files labeled file_t on your system.  file_t indicates a
file/dir with no label on it.  If you are seeing files labeled file_t on your
system you may want to relabel.  touch /.autorelabel; reboot.

The boolean allow_mount_anyfile can be turned on to allow this.
setsebool -P allow_mount_anyfile=1

Or you could chcon -t mnt_t /usr/local/bin

Will allow mount to mount any file/dir on any file/dir.

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