{"id":48,"date":"2011-02-14T17:19:51","date_gmt":"2011-02-14T17:19:51","guid":{"rendered":"http:\/\/www.salsaunited.net\/blog\/?p=48"},"modified":"2011-02-14T17:19:51","modified_gmt":"2011-02-14T17:19:51","slug":"rhel6-and-selinux","status":"publish","type":"post","link":"https:\/\/blog.domb.net\/?p=48","title":{"rendered":"RHEL6 and SElinux"},"content":{"rendered":"<p>One of the most important packages to run successfully RHEL6 and SElinux is the setroubleshoot package. It includes useful tools like the setroubleshoot daemon and utils like sealert, sestatus&#8230;..<\/p>\n<p>So lets see whats the sestatus of my system:<br \/>\n[root@rhel1 ~]# sestatus<br \/>\nSELinux status:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 enabled<br \/>\nSELinuxfs mount:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/selinux<br \/>\nCurrent mode:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 enforcing<br \/>\nMode from config file:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 enforcing<br \/>\nPolicy version:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 24<br \/>\nPolicy from config file:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 targeted<\/p>\n<p>Ok so assuming i want to set up an ftp server. I know my configuration is correct. Permissions on the directories are set etc&#8230; But ftp still do not let me write to the directory.\u00a0 So i need to have a tool which shows me the audit.log of selinux. This can be done with sealert.<\/p>\n<p>If you only have a console available and no X-Window System you can use the command<\/p>\n<p>#sealert -a \/var\/log\/audit\/audit.log &gt; myselinuxerrors.txt<\/p>\n<p>or if you have gui<\/p>\n<p>#sealert -b<\/p>\n<p>Mostly you will find hints like<\/p>\n<p>To let anonymous users write to a ftp directory set allow_ftpd_anon_write to 1<\/p>\n<p>to do this just set<\/p>\n<p>#setsebool -P allow_ftpd_anon_write=1<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the most important packages to run successfully RHEL6 and SElinux is the setroubleshoot package. It includes useful tools like the setroubleshoot daemon and utils like sealert, sestatus&#8230;.. So lets see whats the sestatus of my system: [root@rhel1 ~]# sestatus SELinux status:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 enabled SELinuxfs mount:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/selinux Current mode:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 enforcing Mode from config file:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 enforcing&#8230;<\/p>\n","protected":false},"author":2,"featured_media":162,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-48","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/posts\/48","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=48"}],"version-history":[{"count":0,"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/posts\/48\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/media\/162"}],"wp:attachment":[{"href":"https:\/\/blog.domb.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=48"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=48"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=48"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}