LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ntfs parition not mounting at startup if i enabled selinux in rhel 5? (https://www.linuxquestions.org/questions/linux-newbie-8/ntfs-parition-not-mounting-at-startup-if-i-enabled-selinux-in-rhel-5-a-789871/)

kingston 02-18-2010 12:56 AM

ntfs parition not mounting at startup if i enabled selinux in rhel 5?
 
hi all

i have dual OS in my hard disk. win xp and rhel5. i used use ntfs partition too while working in linux. There is no problem until i enable selinux. When i enabled that, its giving some error at startup and left the partition unmounted. But manually i can mount after logged in. But i need it at the startup itself. How to solve this.

i am installed dkms* dkms-fuse* fuse* and fuse-ntfs-3g* rpms to use the ntfs partitions.

deadeyes 02-19-2010 05:25 AM

Quote:

Originally Posted by kingston (Post 3867756)
hi all

i have dual OS in my hard disk. win xp and rhel5. i used use ntfs partition too while working in linux. There is no problem until i enable selinux. When i enabled that, its giving some error at startup and left the partition unmounted. But manually i can mount after logged in. But i need it at the startup itself. How to solve this.

i am installed dkms* dkms-fuse* fuse* and fuse-ntfs-3g* rpms to use the ntfs partitions.

I am not sure if I understand your question correctly.
You are using nfs. THis nfs share is a ntfs filesystem?

What is the error you get? What directory are you trying to mount?
What is the command used or the way you mount the nfs share at bootup?

kingston 02-19-2010 05:32 AM

that is not the nfs share.that is the ntfs filesystem which is having my win OS and one more drive. I tried to mount it on /xpd directory.


This is the output of my "fdisk -l" output.

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 2550 20482843+ 7 HPFS/NTFS
/dev/hda2 2551 8163 45086422+ 7 HPFS/NTFS
/dev/hda3 8164 8176 104422+ 83 Linux
/dev/hda4 8177 9729 12474472+ 5 Extended
/dev/hda5 8177 9470 10394023+ 83 Linux
/dev/hda6 9471 9601 1052226 82 Linux swap / Solaris

This is some error messages what i have seen in the dmesg output.

audit(1266569831.609:4): avc: denied { getattr } for pid=1529 comm="mount.ntfs-3g" path="/sbin/modprobe" dev=hda5 ino=1820684 scontext=system_u:system_r:mount_t:s0 tcontext=system_u:object_r:insmod_exec_t:s0 tclass=file
audit(1266569832.800:5): avc: denied { mount } for pid=1529 comm="mount.ntfs-3g" name="/" dev=hda1 ino=1 scontext=system_u:system_r:mount_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=filesystem
audit(1266569832.928:6): avc: denied { mount } for pid=1536 comm="mount.ntfs-3g" name="/" dev=hda2 ino=1 scontext=system_u:system_r:mount_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=filesystem

This is my fstab file:

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-hda6 swap swap defaults 0 0
/dev/hda1 /xpc ntfs-3g defaults 0 0
/dev/hda2 /xpd ntfs-3g defaults 0 0

deadeyes 02-20-2010 04:59 AM

Quote:

Originally Posted by kingston (Post 3869225)
that is not the nfs share.that is the ntfs filesystem which is having my win OS and one more drive. I tried to mount it on /xpd directory.


This is the output of my "fdisk -l" output.

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 2550 20482843+ 7 HPFS/NTFS
/dev/hda2 2551 8163 45086422+ 7 HPFS/NTFS
/dev/hda3 8164 8176 104422+ 83 Linux
/dev/hda4 8177 9729 12474472+ 5 Extended
/dev/hda5 8177 9470 10394023+ 83 Linux
/dev/hda6 9471 9601 1052226 82 Linux swap / Solaris

This is some error messages what i have seen in the dmesg output.

audit(1266569831.609:4): avc: denied { getattr } for pid=1529 comm="mount.ntfs-3g" path="/sbin/modprobe" dev=hda5 ino=1820684 scontext=system_u:system_r:mount_t:s0 tcontext=system_u:object_r:insmod_exec_t:s0 tclass=file
audit(1266569832.800:5): avc: denied { mount } for pid=1529 comm="mount.ntfs-3g" name="/" dev=hda1 ino=1 scontext=system_u:system_r:mount_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=filesystem
audit(1266569832.928:6): avc: denied { mount } for pid=1536 comm="mount.ntfs-3g" name="/" dev=hda2 ino=1 scontext=system_u:system_r:mount_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=filesystem

This is my fstab file:

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-hda6 swap swap defaults 0 0
/dev/hda1 /xpc ntfs-3g defaults 0 0
/dev/hda2 /xpd ntfs-3g defaults 0 0

What is the file context of the named binaries?
/sbin/modprobe mount.ntfs-3g ,...
I see tcontext=system_u:object_r:unlabeled_t:s0 and am not sure if that is normal behaviour.

setsebool -P allow_mount_anyfile=1
This will probably solve it.

Please let me know if this works.

kingston 02-22-2010 11:29 PM

i enabled the allow_mount_anyfile boolean. But now i am getting the following message in my dmesg and still the filesystem is not mounted.

The error message is:
SELinux: initialized (dev hda1, type fuseblk), not configured for labeling
SELinux: initialized (dev hda2, type fuseblk), not configured for labeling


All times are GMT -5. The time now is 09:07 PM.