shell bypass 403

UnknownSec Shell

: /scripts/ [ drwxr-xr-x ]

name : balance_linked_node_quotas
#!/usr/local/cpanel/3rdparty/bin/perl

# cpanel - scripts/balance_linked_node_quotas.pl   Copyright 2022 cPanel, L.L.C.
#                                                           All rights reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

package scripts::balance_linked_node_quotas;

use cPstrict;

=encoding utf-8

=head1 NAME

F<balance_linked_node_quotas>

=head1 USAGE

    balance_linked_node_quotas [--help]

=head1 DESCRIPTION

If a user has a 10-MiB disk quota and distributes its activity across
multiple cPanel & WHM servers, we need a way to enforce a single quota
across multiple servers. This script serves that function.

To do this, we begin by collecting disk usage from all worker
nodes. For each user, we compute disk usage on all worker nodes then alter
quotas so that each individual node’s account for the user has a quota
proportional to disk usage.

For example: consider a user with a 10-MiB quota who uses a Mail worker.
Assume that the local (controller) node uses 3.1 MiB of space, and the Mail
node uses 6.2 MiB. In this setup, the controller account uses 1/3rd of the
account’s total disk usage, so we’ll assign it that share of the quota, or
3.33 MiB. Likewise, the Mail worker uses 2/3rds of the account’s total
disk usage, so we’ll give it 6.67 MiB of the quota.

Note that we don’t actually limit users until they reach a threshold of
disk usage; until that time each of the user’s nodes has the full quota
(for example, 10 MiB for this user).

=cut

#----------------------------------------------------------------------

use parent qw( Cpanel::HelpfulScript );

use List::Util;

use AnyEvent ();

use Cpanel::Config::Users                  ();
use Cpanel::LinkedNode::QuotaBalancer::Run ();
use Cpanel::Output::Formatted::Terminal    ();
use Whostmgr::ACLS                         ();

use constant _OPTIONS => ('verbose');

our ( $a, $b );

__PACKAGE__->new(@ARGV)->run() if !caller;

#----------------------------------------------------------------------

sub run ($self) {
    local $ENV{'REMOTE_USER'} = getpwuid $>;
    Whostmgr::ACLS::init_acls();

    my $cv = AnyEvent->condvar();

    my @usernames = Cpanel::Config::Users::getcpusers();

    my $logger = Cpanel::Output::Formatted::Terminal->new();

    my $runstate = Cpanel::LinkedNode::QuotaBalancer::Run::run_for_users(
        \@usernames,
        $logger,
        verbosity => $self->getopt('verbose') ? 1 : 0,
    );

    $runstate->get_promise()->finally($cv);

    $cv->recv();

    return;
}

1;

© 2025 UnknownSec
Web Design for Beginners | Anyleson - Learning Platform
INR (₹)
India Rupee
$
United States Dollar
Web Design for Beginners

Web Design for Beginners

in Design
Created by Linda Anderson
+2
5 Users are following this upcoming course
Course Published
This course was published already and you can check the main course
Course
Web Design for Beginners
in Design
4.25
1:45 Hours
8 Jul 2021
₹11.80

What you will learn?

Create any website layout you can imagine

Support any device size with Responsive (mobile-friendly) Design

Add tasteful animations and effects with CSS3

Course description

You can launch a new career in web development today by learning HTML & CSS. You don't need a computer science degree or expensive software. All you need is a computer, a bit of time, a lot of determination, and a teacher you trust. I've taught HTML and CSS to countless coworkers and held training sessions for fortune 100 companies. I am that teacher you can trust. 


Don't limit yourself by creating websites with some cheesy “site-builder" tool. This course teaches you how to take 100% control over your webpages by using the same concepts that every professional website is created with.


This course does not assume any prior experience. We start at square one and learn together bit by bit. By the end of the course you will have created (by hand) a website that looks great on phones, tablets, laptops, and desktops alike.


In the summer of 2020 the course has received a new section where we push our website live up onto the web using the free GitHub Pages service; this means you'll be able to share a link to what you've created with your friends, family, colleagues and the world!

Requirements

No prerequisite knowledge required

No special software required

Comments (0)

Report course

Please describe about the report short and clearly.

Share

Share course with your friends