Version 1.52.1

Released: 2017-10-20

User Level Restores moved to background new

Like other backup/restore processes, the User Level -> Site Backup "Restore" option is now moved to run in the background, like all other backup/restore processes.


TASK QUEUE

Triggering the restore through the GUI will push the request to the task.queue, with the following options, based on the checkboxes selected.

action=restore
type=user
user=username
file=backup-Oct-5-2017.tar.gz
password=base64encodeduserpassword      #for DB permissions
options#=value

for each option# (where # can be any number, usually 0, going up), you'd enter the selected checkbox values, which can be chosen from the following:


autoresponder

database

database_data

dns

domain

email

email_data

emailsettings

forwarder

ftp

ftpsettings

list

subdomain

vacation


Ability to hide "Script Output /path/to/script.sh" for custom scripts new

If you have custom scripts in:

/usr/local/directadmin/scritps/custom/*.sh

on non-zero result, they'll usually display:

Script Output: /usr/local/directadmin/scripts/custom/script_name.sh

before echoing your echo'ed data.

This is typically done to avoid confusion as to what's throwing the error.

But if you're fully aware of it, and are sure you're echoing data on non-zero output, then you should be able to use this.

The internal default is:

show_custom_script_path=1

so to hide the "Script Output" line, you'd add this to your directadmin.conf, and restart directadmin:

show_custom_script_path=0

More JSON new

add json=yes to the GET or POST for the regular requests.

Global change:

All "Select Box" type json output used to have:

"selected ": "yes"

if a given value was selected, where a trailing space was added after "selected".

This has been changed to no longer have the trailing space, so a selected selectbox item will now be:

"selected" : "yes"
CMD_MOVE_USERS

creator - selectbox

selectcreator - selectbox

data_list - array of creators, with values being list of users below that creator.

CMD_ADMIN_SETTINGS

admin_settings - array

email_settings - array

security_settings - array

server_settings - array

CMD_CUSTOM_HTTPD

tokens should match the skin value, so ensure they're all accounted for, even if blank.

Be sure to test for both httpd and nginx, as token names can change.

Applies to both:

domain=domain.com&json=yes

and,eg:

user=username&php-fpm=5.6&json=yes

other save actions return the standard dynamic output.

The plain list:

CMD_CUSTOM_HTTPD?json=yes

returns the json table structure, but a sample row looks like:

{
    "domains":
    {
        "0":
        {
            "domain": "configdomain.com",
            "info":
            {
                "php-fpm1": "5.6",
                "user": "newconfig"
            }
    },
...

where php-fpm1 (and possibly php-fpm2) will show up, if they're present on the system.

Else, the info array column would only have the user entry (eg: for mod_php)

CMD_MULTI_SERVER
CLUSTER_ON=ON|OFF - if the feature is enabled or not
port=2222 current DA port, just used for auto-fill for new server form.
servers - array of remote server IPs or hostnames.  If a hostname, it should also include the "ip" it resolves to in the sub-array.
CMD_PHP_SAFE_MODE

domains - table, searchable/filterable

Then the 4 top level variables:

"have_openbasedir": "1",   - if the system supports openbasedir
"have_safemode": "0", - if the system supports safemode (newer dropped at 5.3)
"open_basedir": "ON", - default setting for newly added domains
"safemode": "OFF" - default value for newly added domain.
CMD_ADMIN_CRON_JOBS
crons - table, similar to CMD_CRON_JOBS?json=yes

currently no actions on this page, just viewing.

CMD_LOG_VIEWER

Various ways a file can be viewed, be sure to test them all.

All cases:

files - array, filename as index, sub-array with size in bytes, text, and optionally "selected ": "yes"

lines = 50 - changes if specific number of lines are set.

  • only json=yes, just the above.

  • raw file - not json output, literally raw, with given settings affecting the output.

  • not raw, other options should be listed:

LOGDATA - contents of the log

GREPVAL - if grep is used, th value entered

ignore_case=0|1 case sensitivity for grep

invert_grep=0|1 negation of grep output.

CMD_SYSTEM_BACKUP

Note, all of the options from the /usr/local/sysbk/conf.sysbk are shown, but not all are really relevant.

Also, there are if-then-else statements in the conf.sysbk, but DA reads over them, so ignore the case-depenent variables.

See skin for what DA actually uses.

CMD_PROCESS_MONITOR

Straight forward display of info, else post for auth or killing processes.

With json, we'll leave the refresh to the skin, so timers, etc are not part of the json out.

Just reload the json as needed when it refreshes.

CMD_BRUTE_FORCE_MONITOR

Be sure to test with all possible combinations of:

  • the presense/absence of block_ip.sh, unblock_ip.sh

  • user_brutecount=0 being disabled shows text instead of json table:

"USERLOGINFAILURES": "user_brutecount disabled",

  • fresh install, no logs yet, sets text to table tokens.

The "Clear Message System" table loads in the same tokens as were set in the Message System for the same action.

By default, only the LOGINFAILURES is search/sortable.

However, if you specify the take token in the "show" varilable, eg:

show=USERLOGINFAILURES

only this table (of the 5) is included, but can then be searched/sorted using standard table variables.

You will still get some other tokens, but they're not resource intensive to build.

CMD_PLUGIN_MANAGER

returns array of plugins, index being the plugin name,

and value being the array of entries from the plugin.conf.

DA also adds the "available_version" via the URL for you, and uses a cache so it's not doing an external request each query.

conversion scripts to support mail_sni fixed

/usr/local/directadmin/scripts/reseller_to_user.sh

/usr/local/directadmin/scripts/move_domain.sh

/usr/local/directadmin/scripts/change_user.sh

To check for:

/etc/dovecot/conf/sni/DOMAIN.COM.conf

and swap the /usr/local/directadmin/data/users/OLDUSER path to /usr/local/directadmin/data/users/NEWUSER in that conf file.

The reseller_to_user.sh will also update the IP files:

/usr/local/directadmin/data/admin/ips/1.2.3.4

/usr/local/directadmin/data/users/newreseller/ip.list

to remove the old reseller, swap it with the new reseller, and ensure the new reseller has the IP in the ip.list file.

nginx: domain.com.cert.combined.combined fixed

When using nginx or nginx_proxy, when saving a ca root certificate, instead of combining the 2 files:

domain.com.cert
domain.com.cacert

it was combining:

domain.com.cert
domain.com.cert.combined

thus giving:

domain.com.cert.combined.combined

Prevent Upper-Case first character in login username for iPhone/iPad fixed

Added:

autocapitalize='none'

to the username text input, so apple products don't set an upper-case first character, which is never needed.

Buffer overrun in User comments fixed

Casting issue where a unsigned negative number is larger than a positive unsigned number caused the "should it grow" check on the buffer to return false.

This caused DA to access memory out of it's allowed bounds, but did not trigger a segfault, but rather an invalid pointer error:

*** Error in `./directadmin': munmap_chunk(): invalid pointer: 0x00007f9fcab48d20 ***

Last Updated: