Version 1.61.1

Released: 2020-06-01

Option to hide record types: NS PTR (SKINS) new

New internal default values:

dns_ns=2
dns_ptr=2

where you could optionally set them to 0, eg:

cd /usr/local/directadmin
./directadmin set dns_ns 0
service directadmin restart

in order to hide them from the interface for Users and Admins.

To only hide it for Users, but allows Admins, set it to 1 instead of 2.

Unlike the other optional record types, eg:

dns_caa, dns_tlsa, dns_spf, dns_ttl, etc

which full block writing those to the zone,

the dns_ns, dns_ptr values, when set to 0,

will only hide them from being added/removed/shown at the User Level page.

The will still be managed internally, and still saved to the zone.

The Admin Level dns editor will continue to show them,

and likely the "Reseller Level -> Login As" to the User Level should override their disabled state, as it would be assumed a Reseller might need to modify them.

SKINS
  • data/skins/enhanced/user/dns_control.html
  • data/skins/enhanced/admin/dns_admin_control.html

new tokens:

DNS_PTR=no|yes
DNS_NS=no|yes

to hide the form values if set to no.

JSON
  • CMD_DNS_ADMIN?domain=domain.com&json=yes
  • CMD_DNS_CONTROL?domain=domain.com&json=yes

new top level values:

"dns_ns": "2",
"dns_ptr": "2",

where if set to 0, hide from all levels.

If set to 1, show this type for Admins, hide from Users.

if set to 2, show for both.

CMD_DNS_ADMIN?json=yes

Added dns_ns & dns_ptr = 0|1|2 into the table "info" array.

If dns_ptr=0 then you'd hide the "create reverse IP lookup" checkbox when creating a zone.


EVO1907

dnssec keygen algorithm/bitsize options new

  1. As of 1.51.0, the dnssec.sh script will attempt to use RSASHA256, if it's available.

Older boxes would use RSASHA1.

This feature adds a directadmin.conf option:

dnssec_keygen_algorithm=

which by default is blank (NULL).

Should you wish to use a new algorithm, you can now set it via, for example:

/usr/local/directadmin/directadmin set dnssec_keygen_algorithm ECDSAP256SHA256
service directadmin restart
  1. Key bitsize

If you're using an algorithm that accepts bits, there is a new default internal directadmin.conf option:

dnssec_keygen_keysize=2048

which can be changed to any bit-size accepted by the algorithm used.

Note that the EC/curves will ignore the bitsize.

Say you were using RSASHA256 and wanted 4096, type:

/usr/local/directadmin/directadmin set dnssec_keygen_keysize 4096

If you wish to not have the env var passed at all to the dnssec.sh script, set the variable to 0.

The valid range for directadmin.conf is 0-4096, however you should refer to:

dnssec-keygen -h

for all supported key sizes for the given algorithm of choice.

SCRIPT

The dnssec.sh script will still load up it's default RSASHA256, but if the env var $dnssec_keygen_algorithm is passed and set,

then the script will first confirm that it's listed in the dnssec-kegen -h output, and only once confirmed, will use it for generation.

If it's not there, a message is geneated, the other RSASHA256 is used, and no error is returned.

Similar behavior for the bit-size. The script defaults to 2048 and only if $dnssec_keygen_keysize is set, will it be used.


T26752

Package: User E-Mail Limit in packages (SKINS) new

Packages now support the User E-Mail limit.

By default, only Admins can view/affect them in packages, unless reseller_can_set_email_limit=1 is enabled, where Resellers can also set the limit in packages.

New variable in the packages file:

email_daily_limit=-1

where -1 means it will use the system global default (/etc/virtual/limit).

0 is not going to be valid here, but on disk it would imply unlimited.

Should you wish to allow unlmited emails to be sent (not recommended), you'd pass:

uemail_daily_limit=yes

similar to other "unlimited" options in packages.

In this even, the package file would store:

email_daily_limit=unlimited

Should a User be created with this package, the value is not stored in the user.conf.

Instead, should it not be set to -1, the limit will be stored in:

/etc/virtual/limit_fred

for User 'fred', for example.

After the User is created, this feature essentially has no effect.

It relies on the system already in place for backup/restores of /etc/virtual/limit_fred

JSON

CMD_SHOW_USER_PACKAGE?json=yes&package=goldpackage&bytes=yes

CMD_SHOW_USER_PACKAGE?json=yes&bytes=yes

will return an extra array item, eg:

"email_daily_limit": 
{
   "disabled": "yes",
   "type": "unlimited",
   "value": "-1"
},
PACKAGES

When saving an existing package, where a User is already set to this package, DA will go through all Users with this package and update their /etc/virtual/limit_fred files.

If you update the package to use value -1, then each limit_fred file will be deleted, reverting to the global default.

SKINS

/usr/local/directadmin/data/skins/enhanced/reseller/show_user_package.html

/usr/local/directadmin/data/skins/enhanced/reseller/create_customized_user.html

New variables:

input: email_daily_limit=-1
checkbox: uemail_daily_limit=ON

======

TOKENS

CAN_SET_EMAIL_LIMIT=yes : Only show the row if this is set to yes.

EMAIL_DAILY_LIMIT : the raw value.
EMAIL_DAILY_LIMITCHECKED: if the unlimited checkbox should be enabled.
EMAIL_DAILY_LIMIT_DISABLED: disable the input field if this is set to "disable"

======

T26846

EVO1913

FileManager: Extract specific file (SKINS) new

When extracting a file, if you pass:

file_info=yes

this will get more info on each file in the archive.

If this is done with json=yes, the "output" array is not passed, but an extra array called "info" is passed, eg:

EXTRACTION

The extraction process for specific files in the archive is the same as before, except we add:

selected=yes
select0=file.txt
select1=test/file2.txt

plus previous vars:

CMD_FILE_MANAGER
method: POST
action=extract
page=2
path=/test.tar.gz
directory=/

as per the index names in the "info" data from JSON, below.

====

ZIP

CMD_FILE_MANAGER/test.zip?action=extract&page=1&json=yes&file_info=yes

{
   "direcotry": "/",
   "fm_settings": 
   {
      "HAVE_ZIP": "yes",
      "MAXFILE": "524288000",
      "ajax_list_max": "20",
      "ajax_search_max_time": "2.000000",
      "filemanager_du": "1",
      "filemanager_show_directory_count": "1",
      "fm_hour_offset": "0.000000",
      "trash": "1"
   },
   "info": 
   {
      "api.txt": 
      {
         "date": "10-22-2019",
         "size": "118",
         "time": "17:02"
      },
      "changelog.txt": 
      {
         "date": "04-10-2020",
         "size": "232",
         "time": "00:34"
      },
      "test.json": 
      {
         "date": "01-11-2020",
         "size": "3",
         "time": "21:53"
      }
   },
   "path": "/test.zip"
}

====

TAR.GZ

CMD_FILE_MANAGER/test.tar.gz?action=extract&page=1&file_info=yes&json=yes

{
   "direcotry": "/",
   "fm_settings": 
   {
      "HAVE_ZIP": "yes",
      "MAXFILE": "524288000",
      "ajax_list_max": "20",
      "ajax_search_max_time": "2.000000",
      "filemanager_du": "1",
      "filemanager_show_directory_count": "1",
      "fm_hour_offset": "0.000000",
      "trash": "1"
   },
   "info": 
   {
      "api.txt": 
      {
         "date": "2019-10-22",
         "owner": "admin/admin",
         "perm": "-rw-r--r--",
         "size": "118",
         "time": "17:02"
      },
      "changelog.txt": 
      {
         "date": "2020-04-10",
         "owner": "admin/admin",
         "perm": "-rw-r--r--",
         "size": "232",
         "time": "00:34"
      },
      "test.json": 
      {
         "date": "2020-01-11",
         "owner": "admin/admin",
         "perm": "-rw-r--r--",
         "size": "3",
         "time": "21:53"
      }
   },
   "path": "/test.tar.gz"
}

=============

SKINS

/usr/local/directadmin/data/skins/enhanced/user/filemanager/extract.html

Wrap this if-then-else around the bottom |OUTPUT| section:

|*if file_info="yes"|
|INFO|
|*else|
   <existing textarea for |OUTPUT|>
|*endif

as the OUTPUT is not passed if file_info=yes is passed.

The new |INFO| token contains a complete form for selecting individual files/folders from the archive.

Leave the existing upper form in place, which implies "all files" for extraction (there are now 2 forms on the page)

The skin.conf has a new option:

fm_extract_single_file=1

which will automatically add the &file_info=yes to the extraction URL in the file listing.

Only applies to hardcoded tables (Enhanced), as json skins would know what they support.

==========

EVO1914

Internal translation via gettext for .pot to .po to .mo formats (Portable Object Templates) new

ALPHA

DirectAdmin's internal code has been updated to support gettext.

This will allow for a cleaner translation process making using of .po files to share internal translations.

The guide on creating your .po file is here:

https://help.directadmin.com/item.php?id=2142

You can confirm you have binaries with gettext support by typing:

cd /usr/local/directadmin
./directadmin o

and you'd want to see:

gettext support: yes

gettext path: /usr/local/directadmin/data/lang

in the output.

The compile date should be May 29, 2020 or later.

===========

OLD internal txt formats

The old data/skin/evolution/lang/en/internal/*.txt formats are still valid (for now)

However if you have a .po/.mo file present, it will take priority and the old internal txt files will not be used.

There are some cases where the gettext formatting doesn't quite work well with the old lang/en/internal/*.txt so they may show up in English until the .po method is used (very few cases)

CMD_LOG_VIEWER raw shows headers fixed

Related to this bugfix:

JSON for CMD_API: backup send

the "Admin Level » Log Viewer" was still generating trailing headers.

File Manager: backup cleanup in event of timeout or broken socket with 'compress and download' fixed

When creating a zip or tar.gz in the File Manager, using the "compress and download" option on directories,

should there be a signal issued for some event, it's possible the compress or download does not return to delete the file after the transfer is done.

A backup files container has been added to the class, such that upon class destruction (which should still happen), it will delete any files that may have been missed due to these signals.


T26764

Global IP: Change owner to an Admin if owned by a Reseller fixed

If you have a shared IP already assigned to a Reseller, and then change it to be global, the IP does not belong to an Admin.

If a Reseller owns an IP prior to it becoming global, this will change the ownership to the Admin making the IP global.


T26829

Use absolute path to 'ip' in removeip script fixed

In some cases the /sbin or /usr/sbin might not be found in the $PATH.

Auto-detect either:

/sbin/ip

/usr/sbin/ip

for absolute path calls when removing an IP.


T26839

Database Access Hosts: Allow wildcard mid-host fixed

DA now allows access hosts in the format:

some-%.host.com

where DA tests by swapping % with a '1', to ensure it's an IP or a valid domain.


T26850

startips: load addip from ./directadmin c fixed

Relating to the directadmin.conf template cleanup in 1.61.0:

directadmin.conf cleanup: rely on internal defaults (TEMPLATES)

The "addip" option was cleared, and the internal value can be reliably be used instead (as the script would very rarely be changed).

This bug is that the startips script was accessing the addip value from the directadmin.conf, so a new install might not be able to find the script correctly.

The pre-release binaries have this fix as of May 26, 2020 at 11:50pm MDT.

Else, use the workaround if needed:

============

WORKAROUND

Edit:

/usr/local/directadmin/scripts/startips

and find the line:

ADDIP=`grep -m1 '^addip=' ${DACONF} | cut -d= -f2`

and replace it with:

ADDIP=`/usr/local/directadmin/directadmin c | grep -m1 '^addip=' | cut -d= -f2`

Lost Password Reset (SECURITY) fixed

Improved checks for Lost Password reset tool.


Credit: Arshad Kazmi

Block custom_package_items if they exist in user.conf fixed

Scenario when the custom_package_items.conf has an index which is a duplicate of the user.conf.

This caused a display error due to the double index.

For example, if "language" is used in the custom_package_items.conf, with this fix, DA will ignore it, and add to error.log:

2020:05:27-17:18:08: Package::get_custom_file:./data/admin/custom_package_items.conf: Contains 'language' which conflicts with a member of the user.conf file in the User class

to prevent the display issue.


T26849

EVO1911

User Backup: clean fixed

non_readable_files folder left after creating a User backup, in some cases.

Fix: Delete it if it exists.


T26664

fm_purge_trash_days not read in fixed

The fm_purge_trash_days=30 is the internal default for the Trash feature:

However, trying to change this value had no effect until this fix.

May 31, 2020

Restore not including cert/pointers fixed

Bug introduced in 1.61.0 preventing certs, pointers, and custom httpd configs from being restored in some cases:

Custom Domain Items: admin_restore_only=yes|no so Users cannot set a value via restore


T26934

php_home_tmp_session_save_path=0 due to static bins fixed

With the recent change to always static binaries which, for many directadmin.conf options, requires a dynamic run-time check of some variables, such as systemd=0|1, this change caused the:

php_home_tmp_session_save_path=0

to always be 0 for static binaries (which is now all binaries).

The php_home_tmp_session_save_path setting default has now been changed to take the systemd value (0 or 1) after it's been dynamically set.

SDOCROOT needed to be used in "Directory" section (TEMPLATES) fixed

With the addition of the sub-domain document root override option:

Subdomain DocumentRoot override file (TEMPLATES)

which allows Users to change their Subdomain DocumentRoot path,

if the value was changed outside of the main domain's document root, the <Directory> section would be incorrect, causing all values, including mod_php flags which may be required.

=========

TEMPLATES

virtual_host2_sub.conf

virtual_host2_secure_sub.conf

Changed:

<Directory |DOCROOT|>

to:

<Directory |SDOCROOT|>

Allow out-of-range per-email limit to be set, if value was already set fixed

When changing the password of an email account, the User can also set the Quota and max send limit.

If you perhaps wanted this one email account to send a very high value, that is not within the normal rules, and have already manually edited the /etc/virtual/domain.com/limit/user file,

when changing the password, DA would throw an error about the limit if it exceeds the User's max.

This change will check to see if the existing value matches the requested value, and if so, do not make any change to the limit (allow the higher value to remain).

This will allow the ability to change the password/quota, without altering the custom high limit value.

FileManager: restore multiple from trash fixed

Relating to the new FileManager trash feature, the restore of a single file is fine if done through an href link.

But selecting multiple files for restore would throw an error:

You must enter a valid path. eg: /.trash/files/file.txt.1

This was due to the post container's "allow duplicates" flag being set for the general select[] style of posting multiple values, instead of select0,select1, causing multiple values in the container::

path=/.trash

path=/.trash/files/delete1.txt

Simply clearing the path before setting the next file loop solved it.

Last Updated: