Koozali.org: home of the SME Server
Obsolete Releases => SME Server 9.x => Topic started by: bs_bay on June 27, 2017, 09:37:43 PM
-
Hi,
I have a series of users who have sub-folders which were stored on the Server and have been mostly restored.
I did not use the "Backup with dar using e-smith-backup" as this method was already in place and am restoring after a server failure. The backup was a straight copy to an external USB hard disk from the server using something similar to:
yes | cp -r /home/e-smith/* /mnt/week1
I am able to copy and restore all the top-level folders such as INBOX, etc., with no problem but if there is a sub-folder beneath the top-level folders, it shows as unavailable (i.e. the folder is greyed out in Mozilla Thunderbird Client) and/or shows no data. Here are two examples:
INBOX
- Paul
Archives
- 2017
I have reviewed the following related post - "IMAP email Inbox subfolder disappeared" and which was very helpful in getting the folders to the right users with the correct permissions (using chown/chmod) on the user folders and the core folders: https://forums.contribs.org/index.php/topic,52741.0/all.html
These core folders work fine. Is there a method to recover these sub-folders? Or at least the email messages in these sub-folders?
Thanks in Advance,
Bill
-
bs_bay
It sounds like those subfolders may have permission and/or ownership issues also. That can cause the grayed out appearance.
Please check them.
You may have needed to use the -R switch so that ownership & permissions was given to the subfolders also
typical usage
chown -R newuser.newgroup dirname
chmod -R /home 777 would change every file and dir of home to 777
Better example at the end of that link you gave ie
https://forums.contribs.org/index.php/topic,52741.msg272073.html#msg272073
chmod -R username:username <maildir folder>/*
-
Hi Janet,
Yes, I did recursively change the user rights with the following: chown -R paul:paul /home/e-smith/files/users/paul/Maildir/*
Thanks for the confirmation on this.
When I look at the rights in the actual messages, such as in "home/e-smith/files/users/paul/Maildir/cur" I see the follow privileges when a new message is created:
-rw-------
I did assign read & write access for owner group other (world) to the existing files:
-rw-rw-rw- 1 paul paul 145552 Jun 26 16:50 1489094998.30601.icarus:2,Sa
But when a new message arrives it assigns the same as when I copied the files and folders:
-rw------- 2 paul paul 249200 Jun 28 09:46 1498664797.26681.icarus:2,STa
to the message files but with no success (folders are still unavailable) so you are suggesting full control 777 to overcome this lack of access? Or, is there something else I can try?
Thanks again,
- Bill
-
Hi Again,
I did set the permissions using chmod 775 and 777 to convert all folders and messages but I still get the same result, the files folders are still unavailable. So, back to the drawing board... I'd welcome any other suggestions.
Thanks,
Bill
-
bs_bay
You should not use 777 or similar, that was just a quick (& unfortunately misleading) example.
Only set what the system is automatically creating.
Perhaps in your email client you need to resubscribe those folders if you are using IMAP.
Show us actual permissions
ie
cd /home/e-smith/files/users/paul/Maildir
ls -al
cd /home/e-smith/files/users/paul/Maildir/subfolder
ls -al
Replace subfolder with actual name
...and drill down with above modified commands as far as necessary to show all subfolder levels for the user.
-
Hi Janet,
I did test full rights and subsequently reset them :-)
Here is the display:
login as: root
root@192.168.1.16's password:
[root@icarus ~]# cd /home/e-smith/files/users/paul
[root@icarus paul]# ls -al
total 28
drwx------ 5 paul paul 4096 Jun 28 15:14 .
drwxr-xr-x 44 root root 4096 Jun 28 15:14 ..
drwxr-xr-x 2 paul paul 4096 Jan 31 2013 home
drwxr-xr-x 6 paul paul 4096 Jun 28 15:31 Maildir
-rw-r--r-- 1 paul paul 472 Jun 28 15:14 .qmail
lrwxrwxrwx 1 root admin 6 Jun 28 15:14 .qmail-default -> .qmail
-rw-r--r-- 1 paul paul 482 Jun 28 15:14 .qmail-junkmail
drwx------ 2 paul paul 4096 Jan 31 2013 .ssh
[root@icarus paul]# cd Maildir
[root@icarus Maildir]# ls -al
total 1676
drwxr-xr-x 6 paul paul 4096 Jun 28 15:31 .
drwx------ 5 paul paul 4096 Jun 28 15:14 ..
drwxr-xr-x 2 paul paul 802816 Jun 28 15:31 cur
-rw-r--r-- 1 paul paul 248736 Jun 28 15:31 dovecot.index
-rw-r--r-- 1 paul paul 86016 Jun 28 15:31 dovecot.index.cache
-rw-r--r-- 1 paul paul 2872 Jun 28 15:31 dovecot.index.log
-rw------- 1 paul paul 56864 Jun 28 15:31 dovecot.index.log.2
-rw------- 1 paul paul 78 Jun 28 15:30 dovecot-keywords
-rw-r--r-- 1 paul paul 476025 Jun 28 15:31 dovecot-uidlist
-rw-r--r-- 1 paul paul 8 Jun 28 15:31 dovecot-uidvalidity
-r--r--r-- 1 paul paul 0 Jun 28 15:31 dovecot-uidvalidity.59542032
drwxr-xr-x 5 paul paul 4096 Jun 28 15:31 .junkmail
drwxr-xr-x 2 paul paul 4096 Jun 28 15:31 new
-rw-r--r-- 1 paul paul 365 Jun 28 15:30 subscriptions
drwxr-xr-x 2 paul paul 4096 Jan 31 2013 tmp
[root@icarus Maildir]#cd cur
[root@icarus cur]# ls -al |more
total 4700856
drwxr-xr-x 2 paul paul 802816 Jun 28 15:31 .
drwxr-xr-x 6 paul paul 4096 Jun 28 15:31 ..
-rw------- 1 paul paul 28294 Jun 28 15:19 1314130336.21255.icarus:2,Sb
-rw------- 1 paul paul 277711 Jun 28 15:19 1314137398.24844.icarus:2,S
-rw------- 1 paul paul 44096 Jun 28 15:19 1314144689.28013.icarus:2,S
-rw------- 1 paul paul 10371 Jun 28 15:19 1314176286.3723.icarus:2,Sb
-rw------- 1 paul paul 8068 Jun 28 15:19 1314256473.10958.icarus:2,Sbd
-rw------- 1 paul paul 39452 Jun 28 15:19 1314284388.25656.icarus:2,S
-rw------- 1 paul paul 25352 Jun 28 15:19 1314285262.26440.icarus:2,Sb
-rw------- 1 paul paul 7404 Jun 28 15:19 1314296710.2849.icarus:2,Sb
-rw------- 1 paul paul 5844 Jun 28 15:19 1314313708.13539.icarus:2,Sb
-rw------- 1 paul paul 5171 Jun 28 15:19 1314367352.32308.icarus:2,Sb
-rw------- 1 paul paul 1440453 Jun 28 15:19 1314371947.3849.icarus:2,Sb
-rw------- 1 paul paul 21466 Jun 28 15:19 1314386727.13835.icarus:2,Sb
-rw------- 1 paul paul 65180 Jun 28 15:19 1314387356.14323.icarus:2,Sb
-rw------- 1 paul paul 532686 Jun 28 15:19 1314389949.15665.icarus:2,Sb
-rw------- 1 paul paul 3107 Jun 28 15:19 1314391308.16509.icarus:2,Sb
-rw------- 1 paul paul 5260 Jun 28 15:19 1314393655.17562.icarus:2,RSb
-rw------- 1 paul paul 42348 Jun 28 15:19 1314407437.21777.icarus:2,Sb
-rw------- 1 paul paul 21551 Jun 28 15:19 1314625202.6113.icarus:2,Sc
-rw------- 1 paul paul 23810 Jun 28 15:19 1314625209.6125.icarus:2,S
-rw------- 1 paul paul 86623 Jun 28 15:19 1314628768.9103.icarus:2,Sbc
[root@icarus cur]#
I started at the user's root level in the /home/e-smith/files/users/paul and on the last listing I piped it to more as there are many files. They all have the same format shown above. I've tried to resubscribe and I get the EXACT same result. I even created a new user with a separate name and replicated the copy to see if I'd inadvertently done something wrong. I even installed the Thunderbird client on a new system with the result still showing the folders as unavailable and no data.
Thanks,
Bill
-
bs_bay
Those look all OK & compare similarly to my system.
Can you show us the same output for mail subfolders that you say cannot be seen (again drilling down level by level).
What happens if you use the sme server webmail, can you see & access the subfolders & messages ?
-
bs_bay
Try this answer for your earier query.
These core folders work fine. Is there a method to recover these sub-folders? Or at least the email messages in these sub-folders?
To test if the messages are easily recoverable
Create a new subfolder within Thunderbird (so the subfolder should therefore be set up correctly)
At the linux command prompt or using mc, copy 6 of the inaccessible messages from the unaccessible subfolder to the newly created subfolder.
See if you can access those messages in Thunderbird.
Then go back to command prompt
cd to the new subfolder cur folder
Check permissions & ownership of the messages
Correct them if necessary
Try accessing again from Thunderbird
Let us know the outcome, showing us your results along the way.
Maybe something like
ls -al |more /home/e-smith/files/users/paul/Maildir/.Archives.subfoldername/cur
replace the Archives & subfolder names as appropriate
-
Janet,
In reviewing the folder structure, it was not so much of an issue of the permissions as it was the folder structure. What I found was the subfolders are shown in the ".Folder" notation and had to be copied manually. Then of course, permissions were changed to the actual owner of the folders. While this dot notation is a standard in folder creation in Linux, I don't know if these are created from the Dovecot format or a result of the Thunderbird client which creates the folders for IMAP use. I actually created a subfolder in another account and viewed the resulting new folder with your suggestion using:
ls -al
and found the newly created folder listing was there.
Thanks for the help and advice Janet!
Bill