Bug 212309 - /usr/local/bin doesn't mount automatically during a system boot
Summary: /usr/local/bin doesn't mount automatically during a system boot
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 6
Hardware: i386
OS: Linux
medium
low
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-10-26 06:35 UTC by Fred New
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-10-26 13:20:29 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Fred New 2006-10-26 06:35:03 UTC
Description of problem:
I have a file system that should mount on /usr/local/bin whenever I boot; it
doesn't.


Version-Release number of selected component (if applicable):
selinux-policy-targeted-2.3.18-10

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 13:20:29 UTC
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.