Version 1.31.0

Released: 2007-09-26

Ability to select all, delete and mark as read in mass for Admin/Reseller ticket system new

Ability to select all, delete and mark as read in mass for Admin/Reseller ticket system.

https://forum.directadmin.com/showthread.php?p=109683#post109683

Added Submit buttons:

action=select
close=Close
read=Mark as read

which can be passed with select0=001234, if you want to set these via the API.

database_create_pre.sh new

similar to database_create_post.sh, except this script has the ability to void the entire transaction by returning a non-zero result.

env values:

username=bob
database=bob_dbname
user=bob_dbuser
passwd=asdf
login_as=1 or 0, set to 1 if a Reseller is using the "login as" feature. THe system_password would be that of the Reselelrs if it's set to 1 so couldn't be used.
system_password=password of the logged in user.

Create definitive Suspend and Activate buttons for accounts suspension. (non-toggle version) (API) new

Currently, to suspend/unsuspend a User with DA or the DA API, you call it once to suspend, and once more to unsuspend. For the interface it's not too bad, but with the API, the script really has to know what it's doing.

This change will add clear buttons and API options to the command to ensure the Admin/Reseller/API script is getting the result it wants.

Note: the old forms will still be valid, the toggle will still work if called via API. It shouldn't break old scripts. The change will simply add an alternative option for doing it, which will also show up in the skins. (so it's both table and API change)

new options to be passed:

dosuspend=anything

or

dounsuspend=anything

with the usual select0=user&select1=user2..etc

The presence of those names will trigger their action.

Their values have no effect.

Affects CMD_SELECT_USERS and CMD_API_SELECT_USERS

FYI: I've created CMD_API_SELECT_USERS which is exactly the same as CMD_SELECT_USERS, except you get a standard API output.

Add a webmail link for roundcube, if it exists on your system.

SKINS:

user/show_domain.html

|$/usr/local/bin/php
<?
if ("|SHOW_LINKS|" == "yes")
{
    if (file_exists("/var/www/html/roundcube"))
    {
        echo "<a href="|HTTP|://|HOSTNAME|/roundcube" target="_blank">Webmail: Roundcube</a><br>\";
    }
}
?>
DONE|

User and domain search fields at the top of the Admin and Reseller main pages (SKINS) new

Add a field to search for user or domain. Will have 2 buttons, one for User, one for domain, to initate the search. The search will be the "contains" search, meaning only a partial match would be needed, to speed things up.

If you just press enter and don't click either of the buttons, the form will assume you're searching for a domain (or partial domain)

SKINS:

for language packs:

lang/en/lf_standard.html

LANG_CONTAINS=contains

admin/contents_main.html

<script language="javascript">
function doSearch(type)
{
    if (document.searchform)
        with (document.searchform)
        {
            if (type == 'user')
                value1.value=value.value
            else
                value8.value=value.value

            submit();
        }
}
</script>
<table width="100%" cellspacing=0 cellpadding=0>
<form action="/CMD_ALL_USER_SHOW" method="GET" name=searchform onSubmit="doSearch('default');">
<input type=hidden name=comparison1 value="contains">
<input type=hidden name=comparison8 value="contains">
<input type=hidden name=value1 value="">
<input type=hidden name=value8 value="">
<tr><td align=center valign=center>
Search: <input type=text name=value value="contains" size=14 onClick="this.select()">
<input class=button type=button value="Domain" onClick="doSearch('domain')">
<input class=button type=button value="User" onClick="doSearch('user')">
</td></tr>
</form>
</table>
<script language="javascript">
if (document.searchform)
{
    with (document.searchform)
    {
        value.focus();
        value.select();
    }
}
</script>

reseller/content_main.html

<script language="javascript">
function doSearch(type)
{
    if (document.searchform)
        with (document.searchform)
        {
            if (type == 'user')
                value1.value=value.value
            else
                value7.value=value.value

            submit();
        }
}
</script>
<table width="100%" cellspacing=0 cellpadding=0>
<form action="/CMD_USER_SHOW" method="GET" name=searchform onSubmit="doSearch('default');">
<input type=hidden name=comparison1 value="contains">
<input type=hidden name=comparison7 value="contains">
<input type=hidden name=value1 value="">
<input type=hidden name=value7 value="">
<tr><td align=center valign=center>
Search: <input type=text name=value value="contains" size=14 onClick="this.select()">
<input class=button type=button value="Domain" onClick="doSearch('domain')">
<input class=button type=button value="User" onClick="doSearch('user')">
</td></tr>
</form>
</table>
<script language="javascript">
if (document.searchform)
{
    with (document.searchform)
    {
        value.focus();
        value.select();
    }
}
</script>

set newly uploaded files to 644 in the filemanager new

Newly uploaded files will be set to 644 instead of 755.

This will mainly only effect new cgi-bin scripts... they'll need to be changed to 755 (or 700) after being uploaded.

open_basedir ON by default new

The default setting for open_basedir will be on.

This will prevent scripts from going places they shouldn't be going as default with new installs. (or for existing installs that have not specified an option).

Admin Level -> Php Safemode Configuration

is where it can be changed if you want to change the value.

if dovecot=yes in options.conf, setup services.status at install time. new

If dovecot=yes exist in /usr/local/directadmin/custombuild/options.conf, then DA will create the services.status with dovecot=ON, and will remove vm-pop3d from the servicse.status at it's creation time.

httpd.conf tempates dynamic based on httpd.conf contents IMPORTANT TEMPLATE CHANGES new

To integrate more cleanly with the new custombuild, the virtual_host*.conf templates will be changed in such a way that they'll be written with the correct settings as required, instead of using <IfModule ...> entries that are currently there which makes apache do the work. This will both reduce the size of the httpd.conf file to speed up readins, but will all for both php4 and php5 to work correctly at the same time (so that they don't fight with the jumble of settings)

details:

if

suPHP_Engine on

exists in /etc/httpd/conf/extra/httpd-suphp.conf, and the file exists, then

SUPHP=1

is added.

if

AddHandler application/x-httpd-php

exists in /etc/httpd/conf/extra/httpd-php-handlers.conf, and the file exists, then:

CLI=1

is added.

Note, that if you don't use custombuild, what you can do is add:

CLI=1 or 0

SUPHP=1 or 0

into the:

/usr/local/directadmin/data/users/username/domains/domain.com.conf

file.. and any value there will override the check that DA will do to the above files.

This allows you to turn these segments off on a per-domain basis.

All 8 virtual_host*.conf files now have a <Directory |DOCROOT|> section that looks like this:

<Directory |DOCROOT|>
Options +Includes -Indexes
|*if CLI="1"|
php_admin_flag engine |PHP|
<IfModule !mod_php6.c>
php_admin_flag safe_mode |SAFE_MODE|
</IfModule>
php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f |USER|@|DOMAIN|'
|*endif|
|*if OPEN_BASEDIR="ON"|
php_admin_value open_basedir |OPEN_BASEDIR_PATH|
|*endif|
|*if SUPHP="1"|
suPHP_Engine |PHP|
suPHP_UserGroup |USER| |GROUP|
|*endif|
</Directory>

SRV and AAAA records in dns zones (SKINS) new

Ability to add and modify SRV records in dns zones.

The documentatin on this should be fairly logical.

Anywhere that has all the record types, eg, a, mx, cname, ns, ptr, etc.. just add 2 more: aaaa and srv.

If you see "txtrecs", then duplicate that section for "aaaarecs" and "srvrecs". If you see tokens like "|TXT|" .. duplicate them to |AAAA| and |SRV| etc.. common sense 😉

SKINS:

admin/dns_admin_control.html

user/dns_control.html

re-suspend account after password change of suspend user. fixed

If an Admin/Reseller actively resets a password of a suspended User, that password will no longer have the suspended ! character in front, so the User will be able to login. This fix re-suspends the account after changing a password. Aplies to interface in DA as well as the API.

exim/proftpd install errors for FreeBSD systems with noexec on /var/tmp fixed

If a FreeBSD system has noexec on /var/tmp, the pkg_add program will fail because it tries to run scripts in there during the package install process.

Solution is fairly simple, added:

TDIR=/root/.pkg.tmp
mkdir -p $TDIR
setenv PKG_TMPDIR $TDIR

to the exim.sh and proftpd.sh right before calling pkg_add, and then

rm -Rf $TDIR
unsetenv PKG_TMPDIR

just after pkg_add.

This will create a temp directory in /root/.pkg.tmp to use for pkg_add, it will be removed later.

Related forum link:

https://forum.directadmin.com/showthread.php?p=110748&posted=1#post110748

Related Errors:

./exim.sh

No matching processes were found

da_exim-4.67-1.tgz 100% of 1674 kB 55 kBps 00m00s

./+INSTALL: Permission denied

pkg_add: install script returned error status

rename index.html to index.html.moved prior to restore of user backup fixed

During a restore, the /home/username/domain folder is restored.

If the account was newly created, there will be the default DA index.html present, as crated by the template.

If the backup only contains an index.php file (for example), the index.html would have been present along with the index.php file. The index.html would take priority, thus the index.php wouldn't be used.

This fix renames the index.html to index.html.moved prior to restoring the domain directory. Renaming vs deleting ensures that if they had their own index.html, it won't be blindly deleted, and some level of effort was made to save that data.

check public_html for correct owner reset fixed

if a server is using the apache_public_html option where the public_html is set to 750 username:apache, change the ownership reset to check if that's enabled to reset to that. Also check for frontpage being enabled (has to be 755, user:user for frontpage)

update frontpage password with DA password fixed

change the frontpage password when the DA user password is changed. Ensure they're synced.

_vti_pvt/service.pwd

uses a standard crypt.

option in mysql.conf for default access_host for remote mysql servers fixed

option in /usr/local/directadmin/conf/mysql.conf for default access_host where the access_host= option will be the IP address that your server connects to the remote mysql server.

By default right now, this is assumed to be the server IP, but this is not always the case in the event that mysql is on a LAN IP address. The server IP would never be connecting on a LAN, thus we need to specify the LAN IP that the DA box lives on, so that DA can add that IP value as an access host on the remote mysql server.

To setup a new default host other than the server IP, edit:

/usr/local/directadmin/conf/mysql.conf

and add:

access_host=1.2.3.4

where 1.2.3.4 is the IP (or host) that will be connecting to the remote server.

DA 1.44.4: Ability to add multiple access hosts:

Ability to add multiple access_host values upon DB creation

prevent an admin from entering /home in the admin backups fixed

If an admin uses the path /home for the backups to be stored, DA will create all of the /home/user.admin.username.tar.gz files but since /home/username would be used as the temp path for storing backup data, it would delete /home/username right after the backup is created. This is bad. Added /, /var, /usr, /home, and /etc to the banned paths.

Workaround: dont use /home for your backup path, and restore the /home/user.admin.username.tar.gz (create missing /home/username folder).

Change ftp_upload.php to use ncftpput fixed

The old method of uploading backup files uses the php upload command ftp_put. This works fine for small user backup files, but not always for larger ones greater than 2 gig in size.

Basically, this fix makes this guide the default:

http://help.directadmin.com/item.php?id=111

(the bottom ncftpput method, not curl)

If you don't have ncfpput, it will tell you. You'd need to run:

cd /usr/local/directadmin/scripts
./ncftp.sh

but all systems since a very long time ago should already have ncftpput anyway.

The file used is:

/usr/bin/ncftpput

so you can just check for that manually if you're concerned you might not have it.

domain_destroy_pre.sh ignoring return value fixed

The pre.sh scripts are supposed to abort the deletion process if the script returns a non-zero result. The return value was being ignored and the domain being deleted anyway. The fix simply aborts the deletion process to when the script returns a non-zero value.

root password protect sensitive files in the admin file editor (SKINS) fixed

The admin file editor has the ability to edit certain files that can be sentive.

This option will add a root password field which will be filled with the root password in order to save these secure documents. You only need to authenticate once, then the password field will go away and you'll be able to edit and save. It will be saved in the sessions that you've authenticated. There will be a 5 second delay on root authentications to ensure you don't brute force it.

SKINS:

admin/file_editor.html

  1. insert |READONLY| into the text area:
<textarea cols=120 rows=35 name=text wrap=off |SAVE_ENABLE| |READONLY|>|FILEDATA|</textarea>
  1. on the bottom listtitle tr row, set it to:
<tr><td class=listtitle colspan=2 align=right>

|*if REQUIRE_ROOT_AUTH="yes"|
<input type=hidden name="authenticate" value="yes">
This file is tagged as secure.  Root password required to edit: <input type=password name="rootpass"> <input type=submit value="Authenticate">
|*endif|

|*if file|
|file|
|*endif|

|*if REQUIRE_ROOT_AUTH!="yes"|
<input type=submit value="|LANG_SAVE|" |SAVE_ENABLE|>
|*endif|

</td></tr>
Last Updated: