[linux-cifs-client] Issue with mount.cifs BUT ONLY on RAID volumes... selinux on

simo idra at samba.org
Sat Sep 15 17:02:53 GMT 2007


On Sat, 2007-09-15 at 08:31 -0700, RogerSalisbury wrote:
> This seems to be an SELINUX issue.
> 
> Failing to mount on raid volumes ONLY &  only when selinux is
> enforcing.
> 
> selinux  messages are lacking & show no such violation
> in /var/log/messages.

SELinux should lo in /var/log/audit/audit.log

You can use audit2allow to convert the AVC messages there into a policy
to allow these operations.

However if you just want to share a new mount point, all you have to do
is to mark the files in there as samba_share_t with the following
command:
chcon -R -t samba_share_t DIR
where DIR is the (mounted) filesystem root.

Use ls -Z to see if they are correctly labeled.


Other bools you may enable wrt samba are:
samba_enable_home_dirs
samba_export_all_ro
samba_export_all_rw
use_samba_home_dirs

you can get the complete list for your system with:
getsebool -a |grep samba

setting any of them is as easy as:
setsebool <opt-name> on
(use -P to make it persistent across reboots)



RTM: chcon, etsebool, setsebool, audit2allow


Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer
email: idra at samba.org
http://samba.org



More information about the linux-cifs-client mailing list