Closed Rudiberto closed 1 year ago
Hi @Rudiberto
I think the problem now is caused by file permissions on the backups themselves, caused by running imap-backup as root.
In general, for your use case, you shouldn't need to run the program as root, just run it as your regular user.
To fix the issue, you can either:
If you choose the second method, you will of course lose your existing backup, so the first method is preferable.
To set your user as the owner of all the backup files, open a terminal, change directory to the path where your backups are stored (default ~/.imap-backup
) and issue the following command:
sudo chown -R $(id -u):$(id -g) *
You have been completely right! Thank you a lot!
sudo chown -R $(id -u):$(id -g) *
solved the problem and I feel so silly!
This version of imap-backup is even better, than the version (4.x.x) I used before.
You have been completely right! Thank you a lot!
sudo chown -R $(id -u):$(id -g) *
solved the problem and I feel so silly!
This version of imap-backup is even better, than the version (4.x.x) I used before.
Run without root rights always fails. After running it with root access, it's sometimes possible without sudo.
Your workaround
sudo chmod o+r /var/lib/gems/3.0.0/gems/mail-2.8.0/lib/*.rb
fixed the issue. Here's the message I got:/usr/lib/ruby/3.0.0/monitor.rb:108:in
sleep': Interrupt from /usr/lib/ruby/3.0.0/monitor.rb:108:inwait' from /usr/lib/ruby/3.0.0/monitor.rb:108:in
wait_for_cond' from /usr/lib/ruby/3.0.0/monitor.rb:108:inwait' from /var/lib/gems/3.0.0/gems/net-imap-0.3.2/lib/net/imap.rb:1441:in
get_tagged_response' from /var/lib/gems/3.0.0/gems/net-imap-0.3.2/lib/net/imap.rb:1502:inblock in send_command' from /usr/lib/ruby/3.0.0/monitor.rb:202:in
synchronize' from /usr/lib/ruby/3.0.0/monitor.rb:202:inmon_synchronize' from /var/lib/gems/3.0.0/gems/net-imap-0.3.2/lib/net/imap.rb:1484:in
send_command' from /var/lib/gems/3.0.0/gems/net-imap-0.3.2/lib/net/imap.rb:1541:inblock in search_internal' from /usr/lib/ruby/3.0.0/monitor.rb:202:in
synchronize' from /usr/lib/ruby/3.0.0/monitor.rb:202:inmon_synchronize' from /var/lib/gems/3.0.0/gems/net-imap-0.3.2/lib/net/imap.rb:1537:in
search_internal' from /var/lib/gems/3.0.0/gems/net-imap-0.3.2/lib/net/imap.rb:1007:inuid_search' from /usr/lib/ruby/3.0.0/forwardable.rb:238:in
uid_search' from /var/lib/gems/3.0.0/gems/imap-backup-8.0.2/lib/imap/backup/account/folder.rb:58:inuids' from /var/lib/gems/3.0.0/gems/imap-backup-8.0.2/lib/imap/backup/downloader.rb:95:in
uids' from /var/lib/gems/3.0.0/gems/imap-backup-8.0.2/lib/imap/backup/downloader.rb:27:inrun' from /var/lib/gems/3.0.0/gems/imap-backup-8.0.2/lib/imap/backup/account/connection.rb:64:in
block in run_backup' from /var/lib/gems/3.0.0/gems/imap-backup-8.0.2/lib/imap/backup/account/connection.rb:122:inblock in each_folder' from /var/lib/gems/3.0.0/gems/imap-backup-8.0.2/lib/imap/backup/account/connection.rb:120:in
each' from /var/lib/gems/3.0.0/gems/imap-backup-8.0.2/lib/imap/backup/account/connection.rb:120:ineach_folder' from /var/lib/gems/3.0.0/gems/imap-backup-8.0.2/lib/imap/backup/account/connection.rb:46:in
run_backup' from /var/lib/gems/3.0.0/gems/imap-backup-8.0.2/lib/imap/backup/cli/backup.rb:17:inblock in run' from /var/lib/gems/3.0.0/gems/imap-backup-8.0.2/lib/imap/backup/cli/helpers.rb:91:in
block in each_connection' from /var/lib/gems/3.0.0/gems/imap-backup-8.0.2/lib/imap/backup/cli/helpers.rb:88:ineach' from /var/lib/gems/3.0.0/gems/imap-backup-8.0.2/lib/imap/backup/cli/helpers.rb:88:in
each_connection' from /var/lib/gems/3.0.0/gems/imap-backup-8.0.2/lib/imap/backup/cli/backup.rb:16:inrun' from /var/lib/gems/3.0.0/gems/imap-backup-8.0.2/lib/imap/backup/cli.rb:58:in
backup' from /var/lib/gems/3.0.0/gems/thor-1.2.1/lib/thor/command.rb:27:inrun' from /var/lib/gems/3.0.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in
invoke_command' from /var/lib/gems/3.0.0/gems/thor-1.2.1/lib/thor.rb:392:indispatch' from /var/lib/gems/3.0.0/gems/thor-1.2.1/lib/thor/base.rb:485:in
start' from /var/lib/gems/3.0.0/gems/imap-backup-8.0.2/bin/imap-backup:12:inblock in <top (required)>' from /var/lib/gems/3.0.0/gems/imap-backup-8.0.2/lib/imap/backup/logger.rb:34:in
sanitize_stderr' from /var/lib/gems/3.0.0/gems/imap-backup-8.0.2/bin/imap-backup:11:in<top (required)>' from /usr/local/bin/imap-backup:25:in
load' from /usr/local/bin/imap-backup:25:in<main>'