Bug 149195 - syslogd and mysqld services do not run under selinux
Summary: syslogd and mysqld services do not run under selinux
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 3
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-02-20 21:11 UTC by Bruce Bigby
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-05-12 18:13:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Bruce Bigby 2005-02-20 21:11:14 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686) Gecko/20040323 Galeon/1.3.7

Description of problem:
I'm not entirely certain about the component against which I should
file this bug report.  Nevertheless, here is the problem.  I'm using
FC3 as  a mythtv PVR system.  However, I needed to reorganize my file
system so that /var appeared under the root (/) partition (/dev/hda2),
rather be dedicated to its own partition (/dev/hda6).  I wanted the
/dev/hda6 partition to be my /multimedia partition, which would
strictly store video, audio,and still photos.  After I rearranged
things, and after a reboot, syslog wouldn't launch properly while
selinux was enabled and I later discovered that mysqld would not run
either while selinux was enabled.  I investigated the problem by
starting in single-user mode and attempting to launch syslog manually.
 selinux complained about syslog not having authorization to perform
some operation under /dev/hda2, which is the root partition and the
new home for /var.  Apparently, there's something about selinux that
is remember that /var was under /dev/hda6.  The change also affects
mysqld.  I presume that the problem is the same. When I disabled
selinux for syslog and mysql, the service were able to start
successfully.  I'm reading up on selinux in an effort to determine how
I could fix this. In the meantime, how can one rearrange data on a
drive without selinux throwing fits?  ;-)

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

How reproducible:
Always

Steps to Reproduce:
1. Install a system that has a root partition that is sufficiently
large enough to include /var but do not put var in the root yet and
also ensure that the system has a separate /var parititon.
2. Once the system is up in running, reboot into single user mode.
3. Create a /var2 directory.
4. cp -apR /var/* /var2
5. umount /var
6. Relabel /var partition to /multimedia.
7. Update /etc/fstab. Change the line, LABEL=/var to LABEL=/multimedia.
8. mv /var2 /var
9. Reboot

    

Actual Results:  The startup process stalls while attempting to launch
the syslog service.


Expected Results:  The syslog service and all other services should
launch successfully.

Additional info:

Is there a proper way to fix this via selinux other than disabling
selinux for syslog and mysql?  What can one do when one needs to
rearrange a file system?  Please don't tell me that I have to reinstall?

Comment 1 Daniel Walsh 2005-02-21 15:02:23 UTC
Try restorecon -R -v /var
to fix the file contexts.


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