View previous topic :: View next topic |
Author |
Message |
carpman Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 20 Jun 2002 Posts: 2202 Location: London - UK
|
Posted: Sat May 26, 2007 2:36 pm Post subject: archivemail permission problem |
|
|
Hello, tried running archivemail but it fails with what looks like a permission problem?
Code: |
archivemail -d465 -s '' -o /home/mail-bak /home/sara/.maildir/.*
Traceback (most recent call last):
File "/usr/bin/archivemail", line 1298, in ?
main()
File "/usr/bin/archivemail", line 619, in main
archive(mailbox_path)
File "/usr/bin/archivemail", line 1042, in archive
_archive_dir(mailbox_name, final_archive_name, "maildir")
File "/usr/bin/archivemail", line 1188, in _archive_dir
archive.finalise()
File "/usr/bin/archivemail", line 542, in finalise
shutil.copy2(self.mbox_file_name, final_name)
File "/usr/lib/python2.4/shutil.py", line 92, in copy2
copyfile(src, dst)
File "/usr/lib/python2.4/shutil.py", line 48, in copyfile
fdst = open(dst, 'wb')
IOError: [Errno 13] Permission denied: '/home/mail-bak/..gz'
|
This was run as root, the dir /home/mail-bak is owned by root?
any ideas?
cheers _________________ Work Station - 64bit
Gigabyte GA X48-DQ6 Core2duo E8400
8GB GSkill DDR2-1066
SATA Areca 1210 Raid
BFG OC2 8800 GTS 640mb
--------------------------------
Notebook
Samsung Q45 7100 4gb |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
magic919 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 17 Jun 2005 Posts: 2182 Location: Berkshire, UK
|
Posted: Sat May 26, 2007 7:21 pm Post subject: |
|
|
Try running the dry run version and gradually adding the switches until you find what is breaking it. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
carpman Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 20 Jun 2002 Posts: 2202 Location: London - UK
|
Posted: Sun May 27, 2007 8:23 am Post subject: |
|
|
magic919 wrote: | Try running the dry run version and gradually adding the switches until you find what is breaking it. |
dry run works fine and says what it will, it only fails on actual run?
tried it with less switches
Code: |
archivemail -d465 -o /home/mail-bak /home/sara/.maildir/.*
|
but still the same?
it seem that it fails when creating the actual archive? _________________ Work Station - 64bit
Gigabyte GA X48-DQ6 Core2duo E8400
8GB GSkill DDR2-1066
SATA Areca 1210 Raid
BFG OC2 8800 GTS 640mb
--------------------------------
Notebook
Samsung Q45 7100 4gb |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
magic919 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 17 Jun 2005 Posts: 2182 Location: Berkshire, UK
|
Posted: Sun May 27, 2007 9:05 am Post subject: |
|
|
I get errors when I run with that .* on the end on mine. Not the same error you get, but it doesn't like for me. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
carpman Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 20 Jun 2002 Posts: 2202 Location: London - UK
|
Posted: Sun May 27, 2007 10:18 am Post subject: |
|
|
magic919 wrote: | I get errors when I run with that .* on the end on mine. Not the same error you get, but it doesn't like for me. |
I tried it without .* but then it only does the inbox and not all other mail dir? _________________ Work Station - 64bit
Gigabyte GA X48-DQ6 Core2duo E8400
8GB GSkill DDR2-1066
SATA Areca 1210 Raid
BFG OC2 8800 GTS 640mb
--------------------------------
Notebook
Samsung Q45 7100 4gb |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
magic919 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 17 Jun 2005 Posts: 2182 Location: Berkshire, UK
|
Posted: Sun May 27, 2007 10:34 am Post subject: |
|
|
Yep. That's what I found. I'm not sure it's smart enough to do the recursing on its own. You'll have to cook up a script to run archivemail I think. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
carpman Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 20 Jun 2002 Posts: 2202 Location: London - UK
|
Posted: Sun May 27, 2007 8:43 pm Post subject: |
|
|
magic919 wrote: | Yep. That's what I found. I'm not sure it's smart enough to do the recursing on its own. You'll have to cook up a script to run archivemail I think. |
Ok have found that dir that archive is being created in must be writable by the users who mail is being archived, i thought that it was needed by user who was running script?
Recursive /.* works fine but you end up with archive for each mail dir in users .maildir but that is fine, in fact it is good ![Smile :)](images/smiles/icon_smile.gif) _________________ Work Station - 64bit
Gigabyte GA X48-DQ6 Core2duo E8400
8GB GSkill DDR2-1066
SATA Areca 1210 Raid
BFG OC2 8800 GTS 640mb
--------------------------------
Notebook
Samsung Q45 7100 4gb |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|