Version 1.31.0
Released: 2007-09-26
new
Ability to select all, delete and mark as read in mass for Admin/Reseller ticket systemAbility to select all, delete and mark as read in mass for Admin/Reseller ticket system.
https://forum.directadmin.com/posts/109683
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.
new
database_create_pre.shsimilar 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.
new
Create definitive Suspend and Activate buttons for accounts suspension. (non-toggle version) (API)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.
new
link for roundcube in the skins (SKINS)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|
new
User and domain search fields at the top of the Admin and Reseller main pages (SKINS)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>
new
set newly uploaded files to 644 in the filemanagerNewly 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.
new
open_basedir ON by defaultThe 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.
new
if dovecot=yes in options.conf, setup services.status at install time.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.
new
httpd.conf tempates dynamic based on httpd.conf contents IMPORTANT TEMPLATE CHANGESTo 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>
new
SRV and AAAA records in dns zones (SKINS)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
fixed
re-suspend account after password change of suspend user.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.
fixed
exim/proftpd install errors for FreeBSD systems with noexec on /var/tmpIf 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/posts/110748
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
fixed
rename index.html to index.html.moved prior to restore of user backupDuring 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.
fixed
check public_html for correct owner resetif 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)
fixed
update frontpage password with DA passwordchange the frontpage password when the DA user password is changed. Ensure they're synced.
_vti_pvt/service.pwd
uses a standard crypt.
fixed
option in mysql.conf for default access_host for remote mysql serversoption 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
fixed
prevent an admin from entering /home in the admin backupsIf 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).
fixed
Change ftp_upload.php to use ncftpputThe 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.
fixed
domain_destroy_pre.sh ignoring return valueThe 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.
fixed
root password protect sensitive files in the admin file editor (SKINS)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
- insert |READONLY| into the text area:
<textarea cols=120 rows=35 name=text wrap=off |SAVE_ENABLE| |READONLY|>|FILEDATA|</textarea>
- 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>