관리-도구
편집 파일: da.cpython-311.pyc
� ΈQgm � � � d dl Z d dlZd dlZd dlmZmZ d dlmZ d dlm Z d dl mZ d dlm Z d dlmZ dZd Zd d�Zd� ZdS )� N)�BASEDIR�ETC_CL_ALT_PATH)�get_user_prefix)� clcaptain)�ExternalProgramFailed)� in_cagefs)�is_daz0/usr/local/directadmin/data/users/%s/php/php.iniz#/etc/cl.php.d/alt-php%s/alt_php.iniFc � � t � � sd S t dz | z dz }t � � s%t | � � }t dz |z dz | z |z }d }d }d}t j | � � }t j � � |j k r|j }|j }d}|rt j ||� � t | |||� � |rt j � � d S d S )N�/z/php/php.iniFT)r r r r r �pwd�getpwnam�os�geteuid�pw_uid�pw_gid�secureio� set_user_perm�create_user_php_ini� set_root_perm) �username�version�is_write_log� link_name�prefix�uid�gid� drop_perm� user_datas ��/builddir/build/BUILDROOT/cagefs-7.6.22-1.el8.cloudlinux.x86_64/opt/cloudlinux/venv/lib/python3.11/site-packages/clcagefslib/selector/panel/da.py�da_change_user_php_inir s� � ��7�7� ����#�%��0�>�A�I��;�;� H� ��*�*���c�M�F�*�S�0�8�;�i�G� � �C� �C��I���X�&�&�I� �z�|�|�y�'�'�'�������� �� )���s�C�(�(�(� ��'�9�l�C�C�C�� !��� � � � � �!� !� c � � |dk �rOt | z }t j � |� � r� t j |d d d|� � }n# t t f$ r Y d S w xY wt j � |� � r& t j |� � n# t $ r Y nw xY w t j |d� |� � � � d S # t t t f$ rB}t j d|z dz t |� � z t j d|� � Y d }~d S d }~ww xY w t j |� � d S # t $ r Y d S w xY wt"