Different permissions on the repository created by Windows

Hi,

I could not find some answer on the subject.

It appears that the permissions on a repository created by a Windows client are different from the permission on a repository created by a Linux client.

On Linux:

ufo: ls -lisag eaa
total 36
183866516 4 drwx------ 7 on wheel 512 Jun 16 09:41 .
183866499 4 drwx------ 8 on wheel 512 Jun 16 09:41 …
183866517 4 -rw------- 1 on wheel 155 Jun 16 09:41 config
201282083 4 drwx------ 258 on wheel 3584 Jun 16 09:41 data
200800554 4 drwx------ 2 on wheel 512 Jun 16 09:41 index
201282082 4 drwx------ 2 on wheel 512 Jun 16 09:41 keys
201282081 4 drwx------ 2 on wheel 512 Jun 16 09:41 locks
201282084 4 drwx------ 2 on wheel 512 Jun 16 09:41 snapshots

On Windows:

ufo: ls -lisag faa
183866519 4 drwxr-xr-x 7 on wheel 512 Jun 16 09:42 .
183866499 4 drwx------ 9 on wheel 512 Jun 16 09:42 …
183866521 4 -rw------- 1 on wheel 155 Jun 16 09:42 config
183866520 4 drwxr-xr-x 258 on wheel 3584 Jun 16 09:42 data
202004358 4 drwxr-xr-x 2 on wheel 512 Jun 16 09:42 index
202004360 4 drwxr-xr-x 2 on wheel 512 Jun 16 09:42 keys
202004359 4 drwxr-xr-x 2 on wheel 512 Jun 16 09:42 locks
201282090 4 drwxr-xr-x 2 on wheel 512 Jun 16 09:42 snapshots

In both cases I use the same SFTP server, with Linux the directories are created mode 700, with Windows they are created mode 755.

Am I doing something wrong?

Tia.

Olivier

Which restic versions are the windows and linux client?

For the SFTP backend restic doesn’t explicitly specify the directory permissions. So apparently the umask used by the sftp server depends on whether the windows or linux client connect to it. But I’m not sure why that is the case.

On Linux, the version is: restic 0.9.6 compiled with go1.12.12 on linux/amd64

On Windows: restic 0.13.1 compiled with go1.18 on winndows.amd64

So it may be due to a different version of restic.

Standard SFTP allows to set permissions. I have tried creating a directory manually with SFTP, both come with mode 755 and I can change it to mode 700.

But the directory created by restic have different mode depending on the system.

Thank you,

Olivier

Please test the same versions on both linux and windows. There have been tons of changes between 0.9.6 and 0.13.1.

Thank you, I will do, but the older version on Linux seems to have more appropriate permissions (only user can access the directories) than newer Windows version (anybody can browse the directories) so I should rather test an older version on Windows?

I’d strongly recommend to use 0.13.1 instead of 0.9.6. There are tons of speed and reliability improvements. And unless you try the newer restic version on Linux you won’t know whether the permissions are a result of the restic version or the operation system.