File access permissions home directory

Hm. The backup seems to work great. However, I get a lot of file access errors when I try to backup my home directory on manjaro linux. What are the adviced file permissions to have duplicati run without these errors?

UPDATE feb 7. The problem is solved. It turned out that the duplicati.service file installed by the AUR package contained a user=dupicati and group=duplicati statement. I removed both lines and now the service runs as root (as is normal for systemd started services).

Welcome to the forum!

What user context is Duplicati running under? If you only want to back up your home folder, maybe you can have it run under your user context.

I know some disagree with this approach, but you could also run it as root so that it has permission to back up everything you want.

I donā€™t mind running it as root. Can you tell me how I accomplish this in linux (manjaro/arch)? In what file live these permissions?

You were not running it as root? In that case, there is a possibility you have used sudo command in such a way that accidentally you have created root-owned files into your home directory. Youā€™d better fix their protections and from now on, be more careful with sudo. Just a guess.

I do not have experience with arch, only Debian. On Debian when I install Duplicati it creates a systemd service but leaves it disabled. A user can opt to run Duplicati under their user context or enable the systemd service (which runs as root by default).

Does arch use systemd? What does this command show?

# systemctl status duplicati

The program clearly does not run as root. There are no root owned files in my home directory. So, how can I get the application to run as root?

I have enabled and started the duplicati systemd service from the moment I installed the application and I login with firefox on http://localhost:8200/ngax/index.html
So what you are saying is, that duplicati should run as root using systemd? I clearly does not since I experience file access problems in my home directory.

File access rights problem may explain why you got a service thatā€™s not root. Thatā€™s how Arch did it.
Does the ps command show Duplicati run as user duplicati, e.g. ps -f -u duplicati or another?
Sometimes people also inadvertently start multiple Duplicati, and so later ones may take port 8300.

ps ax | grep duplicati gives:
577 ? Ssl 0:03 /usr/bin/mono /opt/duplicati-latest/Duplicati.Server.exe --webservice-port=8200

Donā€™t know if itā€™s running as root

Example of an error. The mentioned directory is rwx for the user only. If duplicati runs as root this should not be a problem imh.

2020-02-06 13:00:00 +01 - [Warning-Duplicati.Library.Main.Operation.Backup.FileEnumerationProcess-FileAccessError]: Error reported while accessing file: /home/dick/.gnupg/

Update: I checked with htop and duplicati is running as user ā€˜duplicatiā€™ I guess thatā€™s the problem. How do I change this?

The official deb package released by Duplicati team configures systemd service to run as root. Iā€™m guessing you got your arch package from elsewhere, perhaps arch/manjaro repository?

To change a systemd service to run as root, check the first answer here:

I donā€™t know systemd well, but finding the file to edit looks like it can done as below (mine is off):

$ systemctl status duplicati
ā— duplicati.service - Duplicati web-server
   Loaded: loaded (/lib/systemd/system/duplicati.service; disabled; vendor preset: enabled)
   Active: inactive (dead)

I donā€™t have Arch, but I think they have their own packaging scheme, maybe with various names.

Arch packages need to use a unique naming convention. ā€œ.pkg.tar.gzā€ and ā€œ.pkg.tar.xzā€ are too long and/or confusing

Problem solved. See original question.

1 Like

Facing Same problem , but how did you do that ??
I am using manjaro Linux . How to remove those lines .
Can not access home folder in duplicati .
thanks

Solution still valid in 2022. Nice.