FTP account for admin/root

bernikm

Verified User
Joined
Oct 24, 2011
Messages
19
Hi

Under admin account in DirectAdmin we have configured System and Admin Backup which is created daily into /home/backup folder.
Now we want to access this folder via FTP (from different location).
Under admin account there is no way to configure FTP acount, so we have created a new 'reseller' account, configured a FTP user and tried to give him access to /home/backup/ folder but DirectAdmin returns error

Cannot Execute Your Request
That is not a valid path. Either it is not in your home directory, it doesn't exist, it contains symbolic links, or it contains invalid characters

We have also tried to set full permissions to /home/backup/ folder, but also without success creating FTP users.
Any ideas how to achieve this?
Thank you in advance
 
let backup file to be created in /home/admin/backups so you can easly create an ftp account at admin level to point there...

also, the admin backup have the option for upload directly backusp to an ftp location.

Regards
 
Thanks for a reply.
I need to access directadmin ftp server from different location, so setting FTP transfer from directadmin to second server wont go.

You mentioned creating an ftp account at admin level to point there.. Where can I do this? Under admin account in direct admin there is no option to create FTP account?
Thanks again for help !
 
Login as admin and go to user level, there you would have the management prolly for domain server.domain.tld (for example), there you can create the account and the remote ftp server will use server.domain.tld as host, [email protected] as ftp account you created.

Regards
 
let backup file to be created in /home/admin/backups so you can easly create an ftp account at admin level to point there...

Hi

Have configured backup as suggested to /home/admin/backups
Now after backup, system reports following error


Error Compressing the backup file /home/admin/backup/users/admin/backup/home.tar.gz : /bin/tar: backup/users/admin/backup/home.tar.gz: file changed as we read it

gzip: stdout: No space left on device
/bin/tar: /home/admin/backup/users/admin/backup/home.tar.gz: Cannot write: Broken pipe
/bin/tar: Error is not recoverable: exiting now


Error Compressing the backup file admin.root.admin.tar.gz :
gzip: stdout: No space left on device
/bin/tar: /home/admin/backup/users/admin/admin.root.admin.tar.gz: Wrote only 6144 of 10240 bytes
/bin/tar: Error is not recoverable: exiting now

Any ideas what could be wrong?
Regards,Miha
 
Thanks, but as far I can see, all is done under /home partition (/home/admin/backup) that has enoguh free space ???

Filesystem Size Used Avail Use% Mounted on
/dev/sda1 12G 2.9G 7.9G 27% /
/dev/sda3 3.8G 74M 3.6G 3% /tmp
/dev/sda6 19G 739M 18G 5% /var
/dev/sda5 199G 93G 96G 50% /home
 
If i dont remember bad before compress the backup system copy the files to /home/admin/admin_backups and then start the compression.

If im correct, the free space should be at least 2x greater of the data to backup.

Someone else maybe should confirm this opinion.

Regards
 
That's correct. You should always copy users immediately after backing up instead of at the end; that's either the default or a setting; I don't recall offhand. And you should start with at least twice the space of the largest user you're backing up.

Jeff
 
Login as admin and go to user level, there you would have the management prolly for domain server.domain.tld (for example), there you can create the account and the remote ftp server will use server.domain.tld as host, [email protected] as ftp account you created.

I have 4 DirectAdmin servers, NONE of them have setup a ftp account for admin user, admin user does not have a ftp account. So, as you say, I log in as admin, then go to user level, but there is nothing there, it only say:

Code:
Domain
No Data to Show

So what am I supposed to do? Is it needed for me to add a domain in admin account under user level in order to be able to create a ftp account for admin user? If so, can I add the server host name as a domain there, or will it create trouble?

This have confused me and caused trouble for me all my years using DirectAdmin, and I still do not understand about the ftp account missing for admin user.

Of course I need a ftp account for the admin user if I am going to do admin/backup transfer from one server to another, it will not work out of the box on any DirectAdmin server, because the admin user does not ever never have any ftp account.
 
Create a domain with same hostname could cause problem.

admin user by default would work as ftp user aswell with the directadmin password, doesnt it?

Regards
 
Create a domain with same hostname could cause problem.

Yes, that was my concern too. Thanks.

admin user by default would work as ftp user aswell with the directadmin password, doesnt it?

No. I have NEVER been able to ftp transfer to another directadmin server using admin user name and password. My guess is it is because there does not exist any ftp account in any directadmin server for admin user as default. This has been a ongoing problem for me all years.

The first thing I do every time I install a new DirectAdmin server, is that I change the password for admin user, maybe it only works for all you people that have not changed admin user password? By the way, because it does not exist any ftp account for admin user as default, I got this in directadmin error log when changin admin password:

Code:
013:05:28-11:47:25: Error changing ftp password for admin: That user doesn't exist<br>

Several years ago when I was going to migrate server to another server, I used admin/backup transfer. It was crisis when I discovered that I could not ftp transfer it to the other directadmin server, because the admin user do not have a ftp account. I transferred in another way, to solve immediately.

I even asked DirectAdmin support about it at that time, years ago, without getting a answer that made me understand it. I just don't understand what you other people do?

Do you add another regular domain in admin user account, and then you are able to create a ftp account for admin user? Or do you use another user ftp account when doing admin/backup transfer?
 
Thats pretty strange, your system have no admin user? I do always change da password once installed, and, as soon as installed, admin user does have ftp access to his home directory without need to do anything.

Try add a fake example.com domain at user level for user admin and check than if admin can log via ftp... but that's pretty strange, should definitly not be necessary...

Regard s
 
Of course my system has admin user. I have 4 directadmin servers. None of them has ftp account setup for admin user. This is not only on my system. I have no idea why it is different for you. I have installed directadmin servers since 2009, none of them has had any ftp account for admin user.
 
Ok. I tested it now. I added domain testdomain.com as admin user on user level. Then it worked, I can now log on ftp as admin user. Strangest thing.

Then I deleted the domain testdomain.com, and ftp still works on admin user!

This must be a DirectAdmin bug. But now I have a work around. Add a test domain on user level in admin user account, and then delete it. Then ftp will work for admin user. I will now do this on every server I have.

Finally a solution. Thank you SeLLeRoNe.

I think somebody should report this bug to DirectAdmin support. I might do it later on, but I am sick with the flu, and same time I have very much to do, so it must wait.
 
Ok. I tested it now. I added domain testdomain.com as admin user on user level. Then it worked, I can now log on ftp as admin user. Strangest thing.

Good to know that. Usually I manually add a line for admin into /etc/proftpd.passwd

Just check this, if you want to know how to do it in SSH:

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

Note, the article be the link offers a solution for re-adding all existing system accounts, you should modify it a little bit if you want to add only one admin account.
 
This is not strange at all. As far as I know this is working as designed.
FTP must know a place where to put files. Where do you expect that the ftp server knows where to put files if you don't have a domain with a domain directory? Even if you ftp to an ip address... a virtualhost must be present so you will get in the correct userdir. The vhost will only be made when you create a domain.:)
So correct, if you have an admin user without a domain, you won't be able to ftp to it, at least I also never could.

I always just make the domain that it's going to be. Then restore the backup which will overwrite the settings including the domain I setup and overwriting password with the one from the backup.
Then mostly I change the password back to the new one from DA, just so I can't make a mistake when I still have to work on the old server.
 
@Richard G, You can delete the test domain after you added it on user level in admin account, and ftp still works.

The bug, as I see it, is that the admin user ftp account is not created when admin user is created. Instead I must add a domain on user level to admin account, then automatically the ftp account is created, then I can delete the domain, and ftp account still works.

It should not be needed to add and remove a domain in order for ftp account in admin user to be created, the ftp account should be created automatically when admin user first is created by DirectAdmin.
 
Back
Top