Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have to set SELinux setenforce Permissive in order to give access to my samba share. I wonder if there is proper way to configure SELinux policy for fedora 17 as good admins do.

share|improve this question
up vote 3 down vote accepted

you would need to use setsebool which will tell selinux to allow certain activities.

but first do this:

/usr/sbin/getsebool -a | grep samba

to see if selinux is already allowing samba activity.

if it isn't, here are some examples of what i would use (if i used selinux):

/usr/sbin/setsebool -P samba_enable_home_dir on
/usr/sbin/setsebool -P samba_export_all_rw on

or something comparable depending on what your goal is with how strict you are trying to make it

alternatively you can use system-config-selinux and check the options pertaining to samba

share|improve this answer
Thanks a lot! i go mark as Solved. just a remark when i tried from terminal #/usr/sbin/setsebool -P samba_export_all_rw on i got libsemanage.semanage_get_lock: Could not get direct transaction lock at /etc/selinux/targeted/modules/semanage.trans.LOCK. (Resource temporarily unavailable). Could not change policy booleans. And finally i get wanted result with gui app /usr/bin/selinux-polgengui where i added a rule for just the same boolean as you advised me – Yurij73 Jan 2 '13 at 16:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.