Cannot backup to network share

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
black zero
Normal user
Normal user
Posts: 111
Joined: 2008-08-01 15:26

Cannot backup to network share

Post by black zero » 2012-06-14 04:34

According to manual:
Backup to network drives

For a backup to be successful, the hMailServer service must have permission to write to the path you have specified as backup destination.

If the backup destination is a network drive, you must ensure that the hMailServer service has permissions to write to this drive. Normally, you will have to change the Log-on account for the hMailServer service before backing up to a network drive. This is done in the service settings in the Windows control panel

So, I change log-on info on hmail service as Administrator.

Administrator has logged in into network share with full access right (say, username is abc and password is 12345), remember password was checked.

Hmail still fails to backup to the shared folder (mapped as Z:\)

Kindly advice.

User avatar
Caspar
Senior user
Senior user
Posts: 377
Joined: 2008-09-08 11:47
Contact:

Re: Cannot backup to network share

Post by Caspar » 2012-06-14 09:22

Hmailserver will try to authenticate with the credentials what the service is running, and not the user/password that is saved on the computer.

If you want to have the service to login to the other computer, the username and password need to be the same, or the user/password combination need to have access to the folder if it is within the same domain.
If you have strange problems or errors use the log analyzer! http://log.damnation.org.uk
Join us on IRC! http://hmailserver.com/irc_fullscreen.php

black zero
Normal user
Normal user
Posts: 111
Joined: 2008-08-01 15:26

Re: Cannot backup to network share

Post by black zero » 2012-06-14 10:37

Okay so I added a new user named administrator (same as credential of which hmail is using on the server, previously there wasn't administrator), on the network attached storage so that it matches with each others.

hmail has administrator credential on the server
network attached storage has administrator account, of which the password is exactly the same with the administrator's on the server.

It still fails.

Help again?

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: Cannot backup to network share

Post by ^DooM^ » 2012-06-14 10:55

You are running an internet facing application under the administrator account? That's just asking for trouble.

Create a new dedicated hMail user and set the correct permissions.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

User avatar
Caspar
Senior user
Senior user
Posts: 377
Joined: 2008-09-08 11:47
Contact:

Re: Cannot backup to network share

Post by Caspar » 2012-06-14 11:20

Also are the computers in a Workgroup or in a domain, if they are in the same domain, create a domain user to use it with the hmailservice. If you don't have a domain, and the server is 2008 R2, it might be because it requiers login for the fileshare, which means that even the same user/pass needs to login, try to (temporarly) add guest users to show it (not write, just list) on the share, but keep the NTFS permissions for the user that has the same user/pass.

Also when adding a new user, either make sure you change the passwords on both machines at the same time, or check "password never expires".
If you have strange problems or errors use the log analyzer! http://log.damnation.org.uk
Join us on IRC! http://hmailserver.com/irc_fullscreen.php

User avatar
mattg
Moderator
Moderator
Posts: 21103
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Cannot backup to network share

Post by mattg » 2012-06-15 01:13

black zero wrote:Okay so I added a new user named administrator
You were asked to change the user that the hmailserver service uses, not create a new user
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

black zero
Normal user
Normal user
Posts: 111
Joined: 2008-08-01 15:26

Re: Cannot backup to network share

Post by black zero » 2012-06-15 08:15

^DooM^ wrote:You are running an internet facing application under the administrator account? That's just asking for trouble.

Create a new dedicated hMail user and set the correct permissions.
Don't worry I blocked all incoming connection to that machine. I'll do it after I figure out what's wrong with this backup service. >_<
Caspar wrote:Also are the computers in a Workgroup or in a domain, if they are in the same domain, create a domain user to use it with the hmailservice. If you don't have a domain, and the server is 2008 R2, it might be because it requiers login for the fileshare, which means that even the same user/pass needs to login, try to (temporarly) add guest users to show it (not write, just list) on the share, but keep the NTFS permissions for the user that has the same user/pass.

Also when adding a new user, either make sure you change the passwords on both machines at the same time, or check "password never expires".
Btw, the destination drive is Network Attached Storage. It doesn't have complex function such as domain and/or Active Directory.
mattg wrote:
black zero wrote:Okay so I added a new user named administrator
You were asked to change the user that the hmailserver service uses, not create a new user
I did change hmailserver service to use 'administrator' account on windows' service page.

I created a new user named administrator on NAS (network attached storage) which is mapped to Z:\

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: Cannot backup to network share

Post by ^DooM^ » 2012-06-15 09:26

Try using the UNC path instead of a mapped drive. I always had issues with mapped drives once i was no longer logged in.

\\192.168.1.20\path\to\file\store
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

black zero
Normal user
Normal user
Posts: 111
Joined: 2008-08-01 15:26

Re: Cannot backup to network share

Post by black zero » 2012-06-18 03:02

^DooM^ wrote:Try using the UNC path instead of a mapped drive. I always had issues with mapped drives once i was no longer logged in.

\\192.168.1.20\path\to\file\store
Trying now. Will report back later.

black zero
Normal user
Normal user
Posts: 111
Joined: 2008-08-01 15:26

Re: Cannot backup to network share

Post by black zero » 2012-06-18 07:34

Yo, it works.

When I used UNC path it worked. Certainly ain't credential issue then?

Thanks doom.

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: Cannot backup to network share

Post by Bill48105 » 2012-06-18 15:20

The service is likely having issues resolving the host name but if you got it working great.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Post Reply