Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
opt
/
cloudlinux
/
venv
/
lib64
/
python3.11
/
site-packages
/
clwpos
/
hooks
/
File Content:
wpos_user_dirs_hook.py
# coding=utf-8 # Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2025 All Rights Reserved # # Licensed under CLOUD LINUX LICENSE AGREEMENT # http://cloudlinux.com/docs/LICENSE.TXT from __future__ import absolute_import, print_function import os from clcommon.clpwd import ClPwd from clcommon.public_hooks.lib import ModifyUserHook class WposUserDirsHook(ModifyUserHook): """ Update user's directories after user creation """ def post_create_user(self, username, owner, **kwargs): # Create /var/clwpos/uids/${uid} directory try: uid = ClPwd().get_uid(username) os.makedirs(f"/var/clwpos/uids/{uid}", 0o755, exist_ok=True) except ClPwd.NoSuchUserException: print(f"ERROR: No such user {username}")
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
__pycache__
---
0755
cpanel
---
0755
lib
---
0755
plesk
---
0755
additional_hooks.py
1783 bytes
0644
wpos_modify_user_hook.py
6515 bytes
0644
wpos_user_dirs_hook.py
791 bytes
0644
N4ST4R_ID | Naxtarrr