HEX
Server: Apache
System: Linux hp3-stn-1011028.hostingp3.local 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: csh958633 (951153)
PHP: 8.3.30
Disabled: shell_exec,exec,system,popen,set_time_limit
Upload Files
File: //usr/share/setroubleshoot/plugins/allow_anon_write.pyo
�
c�L]c@s^ddlZejdde�ZejZddlTddlmZdefd��YZdS(i����Nssetroubleshoot-pluginstfallback(t*(tPlugintplugincBs_eZed�Zed�Zed�Zed�Zed�Zd�Zd�Z	d�Z
RS(s^
    SELinux policy is preventing an httpd script from writing to a public
    directory.
    s�
    SELinux policy is preventing an httpd script from writing to a public
    directory.  If httpd is not setup to write to public directories, this
    could signal an intrusion attempt.
    s

    If httpd scripts should be allowed to write to public directories you need to turn on the $BOOLEAN boolean and change the file context of the public directory to public_content_rw_t.  Read the httpd_selinux
    man page for further information:
    "setsebool -P $BOOLEAN=1; chcon -t public_content_rw_t <path>"
    You must also change the default file context labeling files on the system in order to preserve public directory labeling even on a full relabel.  "semanage fcontext -a -t public_content_rw_t <path>"
    sNIf you want to allow $SOURCE_PATH to be able to write to shared public contents�you need to change the label on $TARGET_PATH to public_content_rw_t, and potentially turn on the allow_httpd_sys_script_anon_write boolean.cCsd|}|S(Nso# semanage fcontext -a -t public_content_rw_t $TARGET_PATH
# restorecon -R -v $TARGET_PATH
# setsebool -P %s %s((tselftavctargstdo_text((s5/usr/share/setroubleshoot/plugins/allow_anon_write.pytget_do_text/s
cCstj|t�d|_dS(Ntgreen(Rt__init__t__name__tlevel(R((s5/usr/share/setroubleshoot/plugins/allow_anon_write.pyR
5scCs�|jdg�r�|j|j�r�|jdg�rC|jd�S|jdg�rb|jd�S|jdg�r�|jd�S|jd	g�r�|jd�S|jdg�r�|jd�S|jd
g�r�|jd�SndS(Ntpublic_content_tthttpd_ttallow_httpd_anon_writet1thttpd_sys_script_tt!allow_httpd_sys_script_anon_writetftpd_ttallow_ftpd_anon_writetnfsd_ttallow_nfsd_anon_writetrsync_ttallow_rsync_anon_writetsmbd_ttallow_smbd_anon_write(RR(RR(RR(RR(RR(RR(tmatches_target_typestall_accesses_are_intcreate_file_permstmatches_source_typestreporttNone(RR((s5/usr/share/setroubleshoot/plugins/allow_anon_write.pytanalyze9s




(Rt
__module__t_tsummarytproblem_descriptiontfix_descriptiontif_textt	then_textRR
R!(((s5/usr/share/setroubleshoot/plugins/allow_anon_write.pyRs					(tgettextttranslationtTrueR#tsetroubleshoot.utiltsetroubleshoot.PluginRR(((s5/usr/share/setroubleshoot/plugins/allow_anon_write.pyt<module>s