Re: Making SELinux allow access to certain directories

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Marko Vojinovic wrote:
> Greetings!
> 
> After my box has been rooted, I decided to put more security into it.
> After a brand new install and update of F7, I decided to leave SELinux on,
> and did the 'autorelabel&reboot' thing to make the whole filesystem work.
> 
> But now, I have problems running httpd and smb services. SELinux is
> denying access to httpd for the directory /www where html content is
> placed, and to smb for the directory /home/arhiva/ which should be shared.
> 
> The typical error in /var/log/messages says:
> 
> Oct 15 18:42:11 sith setroubleshoot:      SELinux is preventing
> /usr/sbin/smbd (swat_t) "getattr" to /home/arhiva (user_home_dir_t).     
> For complete SELinux messages. run sealert -l
> 0aa01162-47b3-4934-8687-c10f4f4ca8f3
> 
> After I ran the appropriate sealeart command, it told me to try
> 
> # restorecon -v /home/arhiva
> 
> which didn't solve the problem.
> 
> I am a newbie to SELinux, so would prefer not to create local policies
> etc. What should I do in order to allow access for a typical service to
> typical directory?
> 
> Best regards, :-)
> Marko
> 
> Marko Vojinovic
> Institute of Physics
> University of Belgrade
> ======================
> e-mail: vmarko@xxxxxxxxxxxx
> 
> 
> 
You need to change the labeling on /www

Probably something like

# semanage fcontext -a -t httpd_sys_content_t '/www(/.*)?'
# restorecon -R -v /www

In order to allow httpd to read content in home directories
you need to turn on httpd_enable_homedirs

setsebool -P httpd_enable_homedirs 1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFHE75PrlYvE4MpobMRAgS/AKCOttPbW3087YhGAXvRdBW1HZsMogCcC/Rg
b+u0JOd7IeU06YFbHLc7AJg=
=yI5E
-----END PGP SIGNATURE-----

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux