Koozali.org: home of the SME Server

Affa Restore to server using archive and usb drive not allowing webmail login

Offline tstokovaz

  • *
  • 23
  • +0/-0
Following the tip in the documentation, I did exactly as suggested and set up the new server identically to the old one, copied over my mailbackup-setup.pl fie to root from the archives and the archives to /var/affa. After the rise command was finished I could get to the webpage but NOT login to any of the users.  All the appropriate files seemed to be restored to their proper locations.

1. I CAN login to the root via putty or at the box.
2. I CAN login to the server-manager (even tried changing a password with no luck)
3. I CANNOT log into webmail as admin or any other user though they show in server-manager.
4. Quota page shows all mail amount as zero even though you can see the messages are there and contain information using the command line to go to /home/e-smith/files/users....

Is there a password file, SSL issue or such that is preventing me from validating a password? Somehow the server-manager doesn't seem to record the restored file sizes in the quota section.

A test project has now become a deadline driven request from my supervisor so any help would be much appreciated.

Offline jester

  • *
  • 496
  • +1/-0
You might be better off searching the bug-tracker and if nothing looks like your problem, reporting it!

Offline Stefano

  • *
  • 10,839
  • +2/-0
Quote
All the appropriate files seemed to be restored to their proper locations.

what about permissions?

ciao
Stefano

Offline tstokovaz

  • *
  • 23
  • +0/-0
Does anyone know how to restore all the permissions for a user in horde? I only need to restore one user but I might also need to restore any global permissions related to Horde webmail. I'm guessing I can restore the permissions for the user at his folder level but have never seen the way permissions are set up in the mail system.

Offline tstokovaz

  • *
  • 23
  • +0/-0
You may need to set permissions for the folders and files of the account you are restoring to and if copying other files to that directory as well. This is required unless someone has a less painful way to restore all permissions simultaneously for all accounts. Without this I found that I could not login to the user's webmail account or see folders that were subsequently restored.


chown -R user:user user on each userdir
chmod -R 755 userdir/* on each userdir

chown -R  USERNAME /home/e-smith/files/users/USERNAME
chmod -R 755 /home/e-smith/files/users/USERNAME

After hours and hours of trying various things I found this info that made my restore of a folder show up and be accessible once copied to the correct location. 

I found ls -a useful to show hidden folders in the subdirectory Maildir where I needed to restore a folder called .foldername

I copied the file from the affa backup from the day I wanted to restore using the 
cp -R {path} {path to restore to}  In this case, it was

/var/affa/mailbackup/daily.3/home/e-smith/files/users/USERNAME/Maildir/.foldername /home/e-smith/files/users/USERNAME/Maildir

This copied the folder I wanted back to the location where it had been deleted. Then I applied the chown and chmod permissions to the whole directory.   

The reason for this was that when I did the restore through the rise it did not restore the permissions that had been in effect on the original server. The result was that I could not login to the account and any files I copied to a user's directory after resetting permissions did not automatically assume the permissions of that folder.

this is one way that works. There may be a simpler solution which would be welcomed.