ISPConfig 3 issueshttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues2023-01-29T20:49:52Zhttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6429Statistics (FTP, traffic ect) displays NAN when no records in DB2023-01-29T20:49:52ZKrzysztof BaranowskiStatistics (FTP, traffic ect) displays NAN when no records in DBWhen account is new or don't have any stats there are NAN everywere.
Sites -> ftp stats, traffic stats, backup stats
Email -> mailbox stats, backup stats, traffic stats
![Screenshot_2022-12-16_at_11-37-04_ISPConfig](/uploads/03158c0ae...When account is new or don't have any stats there are NAN everywere.
Sites -> ftp stats, traffic stats, backup stats
Email -> mailbox stats, backup stats, traffic stats
![Screenshot_2022-12-16_at_11-37-04_ISPConfig](/uploads/03158c0aee0a0ff6d9d9411d5f4863d8/Screenshot_2022-12-16_at_11-37-04_ISPConfig.png)https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/6166private/cron.log, private/cron_error.log are rotated multiple times2023-12-25T13:43:49Zlennartprivate/cron.log, private/cron_error.log are rotated multiple times<!-- Before creating a bug report, please:
- Read the contribution guidelines: https://git.ispconfig.org/ispconfig/ispconfig3/-/blob/develop/CONTRIBUTING.md
- Do not ask support questions here. If you are unsure if your problem is a bug,...<!-- Before creating a bug report, please:
- Read the contribution guidelines: https://git.ispconfig.org/ispconfig/ispconfig3/-/blob/develop/CONTRIBUTING.md
- Do not ask support questions here. If you are unsure if your problem is a bug, post a thread on the forum: https://www.howtoforge.com/community/#ispconfig-3.23
- Make sure to remove any content from the description that you did not add. For example, if there are no related log entries, remove the whole "Related log entries" part.
-->
## Summary
<!-- What is happening and what is wrong with that? -->
Users cron log files private/cron.log, private/cron_error.log, are rotated multiple times every night if there are multiple records in table web_domain of type = 'vhost' or type = 'vhostsubdomain' or type = 'vhostalias'.
## Steps to reproduce
1. [First step]
2. [Second step]
3. [and so on...]
see [https://www.howtoforge.com/community/threads/many-user-cron-log-files.86937/#post-422325](https://www.howtoforge.com/community/threads/many-user-cron-log-files.86937/#post-422325)
## Correct behaviour
<!-- What should happen instead? -->
private/cron.log, private/cron_error.log should be rotated only once every night.
## Environment
Server OS + version: (Debian 10/Ubuntu 20.04/CentOS 8/...) \
ISPConfig version: (3.1.15p3/3.2.3/3.2dev/...)
<!-- _you can use `grep 'ISPC_APP_VERSION' /usr/local/ispconfig/server/lib/config.inc.php` to get it from the command line_ -->
Software version of the related software:
<!-- You can use 'nginx -v' or 'apachectl -v' to find the webserver version. Use 'php -v' to find the PHP version.> Put this in code blocks, like so: -->
```
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
define('ISPC_APP_VERSION', '3.2.4');
$conf['app_version'] = ISPC_APP_VERSION;
Server version: Apache/2.4.38 (Debian)
Server built: 2020-08-25T20:08:29
PHP 7.3.28-1+0~20210503.84+debian10~1.gbp6819da (cli) (built: May 3 2021 11:59:15) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.28, Copyright (c) 1998-2018 Zend Technologies
with the ionCube PHP Loader + ionCube24 v10.4.5, Copyright (c) 2002-2020, by ionCube Ltd.
with Zend OPcache v7.3.28-1+0~20210503.84+debian10~1.gbp6819da, Copyright (c) 1999-2018, by Zend Technologies
```
## Proposed fix
optional, of course.
if you want to post code snippets, please use
```
*** 200-logfiles.inc-orig-324.php 2021-05-09 14:47:49.000000000 +0200
--- 200-logfiles.inc.php 2021-05-09 15:25:34.000000000 +0200
***************
*** 71,76 ****
--- 71,79 ----
$sql = "SELECT domain_id, domain, type, document_root, web_folder, parent_domain_id, log_retention FROM web_domain WHERE (type = 'vhost' or type = 'vhostsubdomain' or type = 'vhostalias') AND server_id = ?";
$records = $app->db->queryAllRecords($sql, $conf['server_id']);
+ // ikasp
+ // rotate user cron files once
+ $cron_logfile_rotated = [];
foreach($records as $rec) {
//* create traffic statistics based on yesterdays access log file
***************
*** 126,131 ****
--- 129,139 ----
foreach($cron_logfiles as $cron_logfile) {
$cron_logfile = $rec['document_root'].'/private/' . $cron_logfile;
+ // ikasp
+ // check if already rotated
+ if (isset($cron_logfile_rotated[$cron_logfile]) and $cron_logfile_rotated[$cron_logfile]) continue;
+ $cron_logfile_rotated[$cron_logfile] = true;
+
// rename older files (move up by one)
$num = $log_retention;
while($num >= 1) {
```
or attach a code file. Best is to create a merge request of course.
## References
if you know of related bugs or feature requests, please reference them by using `#<issuenumber>`, e. g. #6105
if you have done a merge request already, please reference it by using `!<mergenumber>`, e. g. !1444
if you know of a forum post on howtoforge.com that deals with this topic, just add the link to the forum topic here
## Screenshots
optional, of course.
Add screenshots of the problem by clicking "Attach a file" on the bottom right.
## Related log entrieshttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues/4794Add support for nginx.org debian packages2020-09-25T21:42:10ZTill BrehmAdd support for nginx.org debian packagesAdd support for the debian packages from nginx.org instead of the nginx packages from the Debian main repository. See #4743 for details.Add support for the debian packages from nginx.org instead of the nginx packages from the Debian main repository. See #4743 for details.Planned featureshttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues/4624Extend nginx directives merge features2020-09-25T21:37:13ZTill BrehmExtend nginx directives merge featuresImplement another command like ##before## to put something in front of a section or something like ##mergestart## to put the merged code at the beginning of the section and not at the end.Implement another command like ##before## to put something in front of a section or something like ##mergestart## to put the merged code at the beginning of the section and not at the end.Planned featureshttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues/4172Mailbox quota per mailbox.2023-12-03T21:11:10ZOttMailbox quota per mailbox.We would like to limit our clients maximum mailbox sizes. Maybe there is chance to implement that feature to limit templates.
Problem is that if the client has 100GB mailbox quota then some clients use all that quota and make 100GB mai...We would like to limit our clients maximum mailbox sizes. Maybe there is chance to implement that feature to limit templates.
Problem is that if the client has 100GB mailbox quota then some clients use all that quota and make 100GB mailbox.
Example:
Limit template - Easy: Clients who use that template, their maximum mailbox size is 3GB.
Limit template - Power: Clients who use that template, they can make maximum 5GB mailboxes.https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/3532Add dynamic reject with postfix verify service2020-09-25T20:35:26ZTill BrehmAdd dynamic reject with postfix verify serviceAdd a dynmic reject configuration by using the postfix verify service for systems that use transports in fron of other mail servers like exchange servers.Add a dynmic reject configuration by using the postfix verify service for systems that use transports in fron of other mail servers like exchange servers.Planned featureshttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues/3109Output of create_jailkit scripts is hidden/discarded, no error control2023-12-03T21:13:45ZsdafsadfsdOutput of create_jailkit scripts is hidden/discarded, no error controlTh jailkit scripts are very prone to fail due to very different reasons(like wrong permissions or binaries missing), which may result in a complete failure to create the functional jail kit; they still provide usefull error output which ...Th jailkit scripts are very prone to fail due to very different reasons(like wrong permissions or binaries missing), which may result in a complete failure to create the functional jail kit; they still provide usefull error output which could give a hint about what is going on. For some reason this output is not shown in ispconfig logs even in debug mode, which makes it rather hard to investigate.
Please make that output to be displayed in the log.https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/3036Add a check if there is enough space in /etc, before writing config file changes2020-08-28T19:04:57ZTill BrehmAdd a check if there is enough space in /etc, before writing config file changesAdd a check if there is enough space in /etc, before writing config file changesAdd a check if there is enough space in /etc, before writing config file changesPlanned featureshttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues/2889make ispconfig compatible with mysql strict mode2020-09-18T16:41:42ZTill Brehmmake ispconfig compatible with mysql strict modehttp://www.howtoforge.com/forums/showthread.php?t=63612http://www.howtoforge.com/forums/showthread.php?t=63612Planned featureshttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues/2632restore website permissions function2020-09-25T09:51:23Zhelptecrestore website permissions functionIn version 3.0.4.6, each website configuration update do a restore of website files permissions and ownership to the original scheme.
In version 3.0.5.x it have been misused probably to get access to sensitive files under some circumst...In version 3.0.4.6, each website configuration update do a restore of website files permissions and ownership to the original scheme.
In version 3.0.5.x it have been misused probably to get access to sensitive files under some circumstances
Now in case something goes wrong with permissions will be useful to have a "restore website permissions" function in admin panel that could be runned once.Planned featureshttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues/2545Add support for realtime logging with vlogger to nginx (code is in forum thread)2020-07-29T17:35:18ZTill BrehmAdd support for realtime logging with vlogger to nginx (code is in forum thread)http://www.howtoforge.de/forum/entwicklerforum-15/vlogger-web_traffic-6737/http://www.howtoforge.de/forum/entwicklerforum-15/vlogger-web_traffic-6737/Planned featureshttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues/2301Edit Domain Module2020-07-22T20:48:00ZMilutin KubikEdit Domain ModuleHello i want add new function for check if is "root domain" owned by another account but without using domain module. I want solution without administrator... we dont have time to add each new domain to customer account... that is not po...Hello i want add new function for check if is "root domain" owned by another account but without using domain module. I want solution without administrator... we dont have time to add each new domain to customer account... that is not possible
So what i want is just check if...
ACCOUNT A: own domain mywebsite.com
ACCOUNT B: want create site as subdomian, aliasdomain, add new site BUT ACCOUNT B want add "mywebsite.com" and that domain is already owned by ACCOUNT A so system stop it and they cant add ANY subdomain like foo.mywebsite.com as new site or any fake aliasdomain because root domain is already owned by ACCOUNT A.
+ any client can add new domains without our check... because we dont have time manage domains for our clientsPlanned featuresTill BrehmTill Brehmhttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues/2163customer cron jobs get prefixed with the user's home directory2020-07-22T22:34:17ZMarc Schützcustomer cron jobs get prefixed with the user's home directoryIf a customer creates a cron job with a command that doesn't start with /, the web user's home directory is automatically prepended to the command. This fact (which is useful by itself) is unfortunately not mentioned in the frontend, and...If a customer creates a cron job with a command that doesn't start with /, the web user's home directory is automatically prepended to the command. This fact (which is useful by itself) is unfortunately not mentioned in the frontend, and thus not obvious to the user.
For me, this was a problem for two types of commands:
1.) "$HOME/some-script.sh" => quoted to avoid problems with spaces in the home directory; one can never know ;-)
This can be easily worked around by prefixing another /: /"$HOME/..."
2.) cd /some/dir && ./do_something.sh
This can be worked around too: /bin/true && cd /some/dir && ...
It would be nice if prefixing of the home directory was made optional (via a checkbox); this can be switch on by default, so existing cron jobs will continue to work.
But there should at least be a note in the frontend about this.Planned featureshttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues/2155Create A-records for ns records in dns wizard2023-12-03T20:57:16ZTill BrehmCreate A-records for ns records in dns wizardCreate A-records for ns records in dns wizard automatically when the ns records belong to the zone that is currently created.Create A-records for ns records in dns wizard automatically when the ns records belong to the zone that is currently created.https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/1942Make vhost file prefix number configurable2023-12-03T21:01:30ZTill BrehmMake vhost file prefix number configurableMake vhost file prefix number configurable to allow easier ordering for sni based vhosts.Make vhost file prefix number configurable to allow easier ordering for sni based vhosts.https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/1856add an api call for refreshing a record2023-12-03T21:00:53ZJustin Albstmeijeradd an api call for refreshing a recordIt might be a good idea to add a function to be able to re-generate all vhosts config files after a template change.
http://www.howtoforge.com/forums/showthread.php?p=273719#post273719
But in general adding an api call for refreshing a...It might be a good idea to add a function to be able to re-generate all vhosts config files after a template change.
http://www.howtoforge.com/forums/showthread.php?p=273719#post273719
But in general adding an api call for refreshing a record without having to make a change to it would be useful.https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/1586Use /etc/skel when creating a new user2023-12-03T20:57:50ZJyri-Petteri PaloposkiUse /etc/skel when creating a new userAttached is a patch to use /etc/skel when creating a new shell user. This is useful for example sharing the same SSH key for hg authentication on a dev server.
It's a suboptimal way to do this (the proper way would be to use the -k opti...Attached is a patch to use /etc/skel when creating a new shell user. This is useful for example sharing the same SSH key for hg authentication on a dev server.
It's a suboptimal way to do this (the proper way would be to use the -k option of useradd, but that's not possible since the same routine isn't creating the directory), but at least it works :)
Index: server/plugins-available/shelluser_base_plugin.inc.php
===================================================================
--- server/plugins-available/shelluser_base_plugin.inc.php (revision 2470)
+++ server/plugins-available/shelluser_base_plugin.inc.php (working copy)
@@ -88,7 +88,11 @@
exec($command);
$app->log("Executed command: ".$command,LOGLEVEL_DEBUG);
$app->log("Added shelluser: ".$data['new']['username'],LOGLEVEL_DEBUG);
-
+
+ $command = 'cp -R -n /etc/skel/. ' . escapeshellcmd($data['new']['dir']);
+ exec($command);
+ $app->log("Executed command: ".$command,LOGLEVEL_DEBUG);
+
// call the ssh-rsa update function
$app->uses("getconf");
$this->data = $data;https://git.ispconfig.org/ispconfig/ispconfig3/-/issues/1462Replicate only selected columns from client table2020-07-21T08:26:15ZTill BrehmReplicate only selected columns from client tableReplicate only selected columns from client table to slave servers.Replicate only selected columns from client table to slave servers.Planned featureshttps://git.ispconfig.org/ispconfig/ispconfig3/-/issues/504Proftpd support2023-12-03T20:53:58ZPaoloProftpd supportI'm using ispconfig 3 with proftpd (instead of pure-ftp).
To support it i make the following small hack:
1 - in table ftp_user added two int column nguid and nuid to store numeric uid/gid corresponding to existing uid/gid (user and grou...I'm using ispconfig 3 with proftpd (instead of pure-ftp).
To support it i make the following small hack:
1 - in table ftp_user added two int column nguid and nuid to store numeric uid/gid corresponding to existing uid/gid (user and group names). I set this fields manually when create a new ftp account (but could be done by a script)
2 - in /etc/proftpd.conf make the very simple config:
<IfModule mod_sql.c>
SQLAuthTypes Crypt
SQLAuthenticate users*
SQLConnectInfo db-ispconfig@127.0.0.1 ispconfig <password>
SQLUserInfo ftp_user username password nuid ngid dir '/bin/false'
SQLUserWhereClause "active = 'y' AND server_id = '1'"
#SQLLog PASS login
#SQLLogFile /var/log/proftpd/mod_sql.log
</IfModule>
You could also track connections count, ul/dl traffic, limit ul/dl rate, etc.
IMHO is a very good idea to store nuid/ngid in table web_domain (corresponding to system_user/system_group) when a new web/user is created: is a very usefull info!
This nuid/ngid can then be copied in table ftp_user when a new ftp account is created/edited.Horst FickelHorst Fickel