← Back
Editing: httpd_write_content.cpython-312.opt-1.pyc
� �Z`q � �x � d dl Z e j dd�� Zej Zd dl� d dlmZ G d� de� Zy) � Nzsetroubleshoot-pluginsT)�fallback)�*)�Pluginc �@ � e Zd Z ed� ZdZ ed� ZdZd� Zd� Z y)�plugina� SELinux prevented httpd $ACCESS access to $TARGET_PATH. httpd scripts are not allowed to write to content without explicit labeling of all files. If $TARGET_PATH is writable content. it needs to be labeled httpd_sys_rw_content_t or if all you need is append you can label it httpd_sys_ra_content_t. Please refer to 'man httpd_selinux' for more information on setting up httpd and selinux. z1chcon -R -t httpd_sys_rw_content_t '$TARGET_PATH'z2You need to change the label on '$FIX_TARGET_PATH'zf# semanage fcontext -a -t httpd_sys_rw_content_t '$FIX_TARGET_PATH' # restorecon -v '$FIX_TARGET_PATH'c �Z � t j | t � | j d� y )N�d )r �__init__�__name__�set_priority)�selfs �8/usr/share/setroubleshoot/plugins/httpd_write_content.pyr zplugin.__init__, s � �����h�'����#�� c �� � |j ddg� r]|j dg� rK|j ddg� r8|j |j |j z � r| j � S y )N�httpd_t�httpd_sys_script_t�httpd_sys_content_t�file�dir)�matches_source_types�matches_target_types� has_tclass_in�all_accesses_are_in�create_file_perms�rw_dir_perms�report)r �avcs r �analyzezplugin.analyze0 sh � ��$�$�i�1E�%F�G��$�$�&;�%<�=����v�u�o�.��&�&�s�'<�'<�s�?O�?O�'O�P��{�{�}�$�r N) r � __module__�__qualname__�_�problem_description�fix_cmd� then_text�do_textr r � r r r r s6 � �� � �� B�G��F�G�I�&�G��r r )�gettext�translationr! �setroubleshoot.util�setroubleshoot.Pluginr r r&