🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-08-09 13:11:13 | PHP 8.2.33
📂
/ (Root)
/
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
xray
/
__pycache__
📍 /opt/cloudlinux/venv/lib/python3.11/site-packages/xray/__pycache__
🔄 Refresh
✏️
Editing: create_user_uid_dirs.cpython-311.pyc
Read Only
� 9Mj� � �2 � d dl Z d dlmZ d dlmZ d� Zd� ZdS )� N)�cpusers)�ClPwdc �` � t � � D ]�} t � � � | � � }d|� �}t j |dd�� � t ||� � �Q# t j $ r t d| � �� � Y �tt $ r}t d| � d|� �� � Y d}~��d}~ww xY wdS ) a� Create /usr/share/alt-php-xray-tasks/{uid} directories for all users. The {uid} directory itself stays root-owned (0755) because it holds root-written task files the C extension reads. A {uid}/log/ subdirectory is created owned by the user (mode 0700) so the PHP worker, which runs as that uid, can write xray.to_file trace dumps there while no other local user can read or pre-create them. :return: None z/usr/share/alt-php-xray-tasks/i� T��exist_okzERROR: No such user zError processing user z: N) r r �get_uid�os�makedirs�_create_user_log_dir�NoSuchUserException�print� Exception)�username�uid�base_dir�es �P/opt/cloudlinux/venv/lib64/python3.11/site-packages/xray/create_user_uid_dirs.py�create_user_uid_dirsr s� � � �I�I� <� <�� <��'�'�/�/�(�+�+�C�=��=�=�H��K��%�$�7�7�7�7� ��3�/�/�/�/���(� 5� 5� 5��3��3�3�4�4�4�4�4�� <� <� <��:�8�:�:�q�:�:�;�;�;�;�;�;�;�;����� <���� <� <s �A A � !B+� B+�B&�&B+c �� � t j � | d� � }t j |dd�� � t j ||d� � t j |d� � dS )a` Create base_dir/log owned by uid with mode 0700 (idempotent). makedirs' mode is masked by umask and is not applied to an already existing directory, so chmod/chown are issued explicitly to enforce the intended ownership and permissions on every run. The group is left unchanged (root) -- mode 0700 makes the group irrelevant. �logi� Tr ���N)r �path�joinr �chown�chmod)r r �log_dirs r r r # s\ � � �g�l�l�8�U�+�+�G��K����.�.�.�.��H�W�c�2�����H�W�e������ )r �clcommon.cpapir �clcommon.clpwdr r r � r r �<module>r! s\ �� � � � � "� "� "� "� "� "� � � � � � �<� <� <�.� � � � r
💾 Save Changes
❌ Cancel