Solved Error Creating Domain mkdir(NULL)

Everterstraat

Verified User
Joined
Mar 21, 2015
Messages
25
Hi all,

Does anybody know what's going wrong? It appears on 2 CentOS servers with latest DA version!

1614007603915.png

Not only by creating domains but also subdomains and renaming or move between users!

I've already checked locks by lsattr, -i doesnt help and the only flag isset e(xtends)!

What chmod and chown permissions does httpd.conf have by default? Or is there another possible problem cause failing mkdir doesn't have to do anything with it, right?
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
9,992
Location
LT, EU
Please check:
Code:
df -h
df -i

To make sure disk resources are available.
 

Everterstraat

Verified User
Joined
Mar 21, 2015
Messages
25
Hi,

Sources aren't the problem, did check that first and backups are running without problem so disklimit isn't a issue!

1614068140587.png

1614068153574.png

Any other options? What are the required chmod's and chown's for files as httpd.conf
 

Everterstraat

Verified User
Joined
Mar 21, 2015
Messages
25
Just used ./set_permissions.sh all

all() { da_files; user_homes; do_mysql; email; logs; etc_configs; }

Since all also does da_files and without effect, what are my other options?
 

Everterstraat

Verified User
Joined
Mar 21, 2015
Messages
25
Debugmode:

1614073643538.png


/root/domains/default isn't a dir, never been right? Where could it been wrong?
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
9,992
Location
LT, EU
Check the owner of the user, also check his homedir in /etc/passwd
 

Everterstraat

Verified User
Joined
Mar 21, 2015
Messages
25
What i'm looking for @smtalk, didn't see anything strange..

passwd

What chmod does a /home/user/domains have? And which chown? See here;

drwxr-x--- 14 admin access 4.0K Feb 23 10:45 domains

Cause access looks strange to me? It should be admin, right? But the error from debug doesn't came from /home/admin/domains but /root/domains/default or the fallback /usr/local/directadmin/data/templates/default
 
Last edited:

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
9,992
Location
LT, EU
Your debug output was "cut", so I'm not sure what's above the text you've pasted.
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
9,992
Location
LT, EU
Code:
grep creator /usr/local/directadmin/data/users/admin/user.conf

It should be set to root, next, if you login as any customer to create the domain - check his user.conf to see what's the creator set there?
 

Everterstraat

Verified User
Joined
Mar 21, 2015
Messages
25
Creator=root for admin, for resellers is admin and other users it's the reseller, that correct right?

I really don't know what's going on, but everything that has to do with domains fails, any other ideas?
 

Everterstraat

Verified User
Joined
Mar 21, 2015
Messages
25
Which other dir has to be written @smtalk behave /home/user/domains/domain.tld/public_html/ when creating or modifying a domain? Cause that dir is written but the error is mkdir(NULL) or is that a general error and has nothing todo with it?
 

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
9,108
I've traced the code and I believe it's related to the php_mail_log_dir setting.
Check your conf/directadmin.conf for this and see what it's set to.
It should either be set to a value, or completely gone (name and all).
If it's present with a blank value, this might not make it the internal null DA is looking for, which could cause issues.

To debug further (if needed), I've added a few changes to the pre-release bins to help provide a clearer output to confirm if that's the call (I added "~/.php" as a prefix to the error message). Also added debug level 443 output, and error.log logging, for the "Apache::touch_mail_log" function which will prefix the debug output and error.log output.

If the above is true, let me know what value was in the directadmin.conf and I'll make adjustments so that a blank value still ends up being null so the override never triggers unless it's got a filled value.

John
 

Everterstraat

Verified User
Joined
Mar 21, 2015
Messages
25
Hi John,

Thanks for your detailed reply, problem solved: "php_mail_log_dir=NULL" wás preventing adding or modifying domains! After removing it from directadmin.conf (and wait for queued reload) no errors seen!
 
Last edited:

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
9,108
Check:
Code:
/usr/local/directadmin/directadmin c | grep php_mail_log_dir
Also check:
Admin Level » Licenses/Updates » Last Restart
just to confirm that the previous restart did work correctly.

If you've not already done so, grab the latest pre-release binaries, which will give a bit more info.
Check /var/log/directadmin/error.log to confirm if anything regarding this was added.

----
If none of the above helps, it might be some other area and would need to dig further.
Hopefully not, as the php_mail_log_dir=NULL reply does support our current thought process.
 
Top