backintime icon indicating copy to clipboard operation
backintime copied to clipboard

OK in the settings dialog has no effect (because config file not owned by current user)

Open cnoam opened this issue 8 months ago • 8 comments

in a new ubuntu 22.04 installation, I tried to change the rsync settings. the OK button does nothing. The CANCEL is working properly.

Traced the reason to having insufficient permissions in ~/.config . The owner was not the current UID.

Suggestion: let the error flow from rsync

cnoam avatar Mar 08 '25 15:03 cnoam

Hello cnoam, thank you for reporting.

Can you please give me more details to reproduce the problem.

I tried chown root:root /home/user/.config. But with that BIT creates a lot of errors even if I start it. So to me BIT is not silent.

Regards, Christian

buhtz avatar Mar 09 '25 09:03 buhtz

I did the following:

  1. chown root:root /home/user/.config
  2. open BIT. It says it has no config.
  3. choose folder in my external disk where I stored the BIT backup.
  4. open settings (or was it opened automatically?)
  5. choose "never" for the backup period.
  6. press "OK". nothing seems to happen.
  7. press cancel. The dialog closes. BIT crashes after a short while, with Ubuntu message saying QT app crashed; when diving into the logjournal, I see "permission denied writing to .../.config

cnoam avatar Mar 15 '25 14:03 cnoam

Thank you this helps.

2. open BIT. It says it has no config.
3. choose  folder in my external disk where I stored the BIT backup.

What exactly have you done after point 2? You choose the folder on your external disk. But does this folder contain a config file? At point 2 BIT offers you t restore a config file from somewhere else (e.g. a backup). Did you choose to restore an existing config (Yes) or not (No)?

Image

buhtz avatar Mar 15 '25 16:03 buhtz

I should have been clearer. At 2, I opened BiT (This is an old build from ubuntu 22.04 repos) and it gave a message similar (or the same) to the one you show. Then (stage 3), I chose to restore an existing configuration from my external backup disk, from the /path/to/backup/1/ folder.

After the test, I upgraded to 24.04 (which brings BiT 1.4.3)

PS: Unrelated to this issue: Where can I ask usage questions? I saw Mastodon but need invitation. I have issues with restoring to the new computer with different hostname and UID/GID

cnoam avatar Mar 15 '25 20:03 cnoam

Where can I ask usage questions? I saw Mastodon but need invitation. I have issues with restoring to the new computer with different hostname and UID/GID

See Contact & Social please. I would recommend the mailing list to reach more users. You can also check the Ubuntu and Debian community if you want to reach other users and ask them questions.

buhtz avatar Mar 16 '25 16:03 buhtz

I can reproduce the behavior following your steps. But I wonder about the real use case. Why is there a config file with permissions not fitting the current user?

buhtz avatar Mar 16 '25 16:03 buhtz

because while trying to restore the data (having uid=1000) to my account (with uid=1001), I tried "BiT root mode" and it modified my {/home , /home/$USER/ , /home/$USER/.config, etc.}

I am not sure what is the correct use case for using root, but it is not this :)

cnoam avatar Mar 16 '25 17:03 cnoam

because while trying to restore the data (having uid=1000) to my account (with uid=1001), I tried "BiT root mode" and it modified my {/home , /home/$USER/ , /home/$USER/.config, etc.}

I am not sure what is the correct use case for using root, but it is not this :)

When restoring user data (uid=1000) you should use the "user" BIT of course not "root". The "root mode" is to backup and restore files and directories that are not owned by the current user.

So I would say your situation occurred because of using BIT in a way that it was not intended to be used. So the case is rare and the issues priority is low.

However, BIT should somehow react more verbose to this situation. Pressing OK without any effect is not good. So I still treat this behavior as a bug.

buhtz avatar Apr 15 '25 19:04 buhtz

Again I struggle to reproduce the problem. When I try to modify a config not owned by my current user BIT gives a proper error message about missing permissions. So it behaves as intended.

If you have nothing to add I would close the issue.

buhtz avatar Jul 08 '25 12:07 buhtz