ProFTP error on User Creation

fshagan

Verified User
Joined
Aug 2, 2011
Messages
38
I'm getting an error message when trying to add a new user and domain via DirectAdmin:

Ftp: Unable to get lock on (null)

Errors encountered while creating domain. Not adding domain to
Error creating Domain

396ee423-575a-4b91-9eca-343b1f96e5761581605053[1].png



I see the proftpd.passwd file has "owner:user" as "root:ftp". Is that right? Or perhaps the permissions are wrong?

4af07da0-4b6c-4efb-91fc-2629a3082df31581607623[1].png

Any help is appreciated!
 
Well, uninstalled and reinstalled proftpd via custom build and still getting the same thing.
 
Thanks for that; I tried again and there is a recurring error for connecting to SSL. The red arrow shows the domain creation error I'm getting, "Unable to get lock on (null)".

6b0244ca-d8a7-4e99-95e4-c2fe9a77ba971581688616[1].png

Now I just have to figure out what's going on with that. IIRC there's a file for SSL somewhere that lists all domains, and I've had problems with it not being writeable before.
 
Here are the entries for adding and deleting the new user and domain:

ddadb5a6-bdeb-4a71-9cc1-ad5c133b2cf01581691160[1].png

It looks like DirectAdmin can't write to several files. The "Unable to add user to ssh config file" should be the file sshd_config, right? Permissions on it and the proftpd.passwd file were 600. I changed them both to 644. I'm still getting the error when trying to add a domain.

Here's the latest entries from the DA error log related to the last attempt (after changing the file permissions on sshd_config and proftpd.passwd files):

2a3641d6-04d9-4cf6-ba1d-e74548d4926c1581692517[1].png

Any suggestions? Is there a way to reinstall DA non-destructively?
 
I don't have idea on what is going on your server. You probably need to open a ticket with DirectAdmin support and let them to check your server. Unable to get lock on might mean the file is opened by another process.

I wonder why are there lines about removing an user if you try to add the user?
 
Oh, I included those and should have explained; when creating the user failed I also encountered other errors on removing the user. The user is removed successfully, but I thought those errors might shed some light on the issue for someone.

Anyway, I guess I'll open a ticket with DA. I don't buy directly through DA, but through my VPS host (Ramnode), so I was hesitant to do that. I'll try and see what they say.
 
If you don't have a direct license, they might decline your request.

Do you have custom scripts under /usr/local/directadmin/scripts/custom/ ? What are they?
 
I have a license through my host (Ramnode), and pay a separate $3 a month charge for it (which is cheaper than the $15 a month license I was going to buy). So I'm sure it's a legal license. It is registered to the host's IPs and can't be transferred.

The scripts in usr/local/directadmin/scripts/custom/ are:

block_ip.sh
brute_force_notice_ip.sh
show_blocked_ips.sh
unblock_ip.sh

The README file lists several other scripts that run before and post user creation, but I don't see those there. Just the four above.

DA version is 1.60.3
 
And no help from them, since it is an un-managed account.

In trying to spin up a new server and add a DNS record for my new hostname I found that I can't write to the domain-name.com.bd files in /var/named either.

Question: permissions are at 644, is that right?
Second question: is the owner:user of all these files root:root? Or should they be something else, like root:named or?
 
Last edited:
How do you install DirectAdmin? Do you have it pre-installed? Or you run an install.sh script?

domain.db files should be -rw-r--r-- root:root on CentOS like servers.
 
It was installed via a script, and was working fine for a few weeks. Not sure what happened. I did have some issues getting Let's Encrypt working and went through some permissions issues at that time.

Looks to me like perms are at -rw-r--r-- with root:root on all of these, but DA can't open them. Very strange.

355b8717-65da-4391-83e4-a6d73fac483e1582035140[1].png

I'm spinning up a new server anyway; I'll install DA on it the same way and then compare files between the two.
 
That's a good idea. I may try that. I have rebooted the VM to see if it sees any errors on boot. I'm not sure how to run fsck on a KVM instance and not screw something up, so I'll have to do some research on that.
 
Another issue has cropped up. I have a new VPS on the same network so I copied over the recent backups (taken last night), but cannot restore them to the new VPS. The error on trying to restore the backup files is "'/backup/user.conf' - cannot open. Permission denied". I'll try an older backup tonight for one of my static sites.
 
Well, if fsck is not the case, then try to run:

Code:
/usr/local/directadmin/scripts/set_permissions.sh all

on the first (original) server.
 
Thanks for the permissions script. I ran it, but the issue still remains. I think I need to trace through how a user / domain is created manually and then see where I encounter problems.
 
Back
Top