How did you repair permissions? Disk Utility? That won't do it on user files, which might include the stuff you're having problems with.
You might try resetting to defaults if you haven't already.
If you deleted the account from Mail Preferences, restore the <home folder>/Library/Preferences/com.apple.Mail.plist file.
Then try the special handling for Mail and Time Machine backups. See the blue box in Time Machine - Frequently Asked Question #15.
Yes I did use disk utility - I was not aware of the process you mention. Thanks for the reply, I need to do a bit of reading ref Lion.
I followed the procedure but alas it did not resolve the issue - I still get the same error message.
The problem seems to idicate that I cannot access the plist file on the time machine backups.
I deleted the account using mail preferences, so following your advise:
I restored the pref file from the good known backup date.
I also used disk utility to repair the time machine backup volume which showed no problems.
First of all, restoring from time machine according to FAQ 15, the actual messages in the deleted account were indeed restored to the new mailbox that time machine created and could be viewed - that is fine and solves the problem of lost mail.
Almost solved - but what I was trying to do was :
I had two accounts which show under inbox and when you "get mail" the little whirling indicator shows activity which my wife (and I) liked. After I deleted the second (now unused account) there is no more indicator when "getting mail" and it is not obvious that anything is actually happening. Any mail received will show up under mail activity but if there is none we all just sit there with no feedback until it "beeps".
There was also the other issue of maybe wanting to get back all mail for the deleted account (which you solved).
I can of course recreate the account as a new one but I thought time machine would be able to restore the mail system back to where it was (as it should) - it seems it may not be able to which is not nice as in "what else will fail one day that I dont know about". To restore "as was" is why I tried to restore just the "missing" folder in ~/library/mail/v2 but keep running into these permission problems.
Time machine was the best backup system I have seen in over 30 years in computing but if it now "doesnt" under all circumstances it becomes useless and we will have to go back to manual or other backup systems. Surely Apple will fix it - a backup and restore system has to completely reliable or not at all.
I thank you for your help and, as I say, there is no real urgency as mail items can actually be recovered - it would be nice to be able to restore "as it was" however.
An update to this post for anyone interested.
After searching this "support" site for similar problems and after attempting to alter the time machine backup directory permissions with chmod to no avail with the following error message for just about everthing :
"chmod: Unable to change file mode on <directory name>: Operation not permitted" (I suspect that this is because of the time machine backup structure but dont know)
I tried copying the "lost" directory using terminal with a simple "cp -R <directory path on time machine backup> to my desktop (for convenience only), then to the "mail" folder. This worked with no problems. (ack to some post I got this simple approach from - I lost the thread)
I then used time machine facility to restore the "mail/V2/maildata/Accounts.plist" file which worked fine.
Lo and behold mail is now as it was (I sincerly hope).
Maybe all I needed to do was restore the accounts.plist file but not sure and I am not revisiting this to find out.
It still raises the horrible thought that tme machine is a "bit" broken - one should be able to restore anything from a backup, otherwise its not a backup. I hope Apple fix this.
I have this Exact Same problem , want to restore my V2 folder but have the same permissions problem
Can you let me know what you did step by step , with the cp -R etc as I dont really follw what you wrote above .
I have used Terminal a couple times but really have no idea what I am doing so would be great if you can tell me step by step the Copying process and finally how you restored it .
Thanks in Advance