[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tarsnap Cache Issue in WSL



Update for the list: it's plausible that this arose due to:

linkat fails with EACCES when the target inode has deleted original hardlink
https://github.com/microsoft/WSL/issues/3972

This occurs with the wslfs, not lxfs.  (wslfs is the new default
filesystem in Windows Subsystem for Linux.)

That bug was marked as "fixedinreleasebuild" on 2020-06-02, so it
should be ok in Windows Subsystem for Linux builds 20175, 20150,
and 19640.  I've heard that those builds are currently considered
"Insider Preview" and the latest public build is 19041.

The tarsnap client runs into this problem in
chunks_directory_commit(), when it tries to create a link from
directory.tmp to directory.  If that link() receives ENOSYS or
EPERM, we fall back to rename(); but we expected other errors
(such as EACCES) to indicate a fatal error.

Cheers,
- Graham

On Tue, Jul 21, 2020 at 01:12:29PM -0700, Graham Percival wrote:
> Hi Brendan,
> 
> Could you try executing this command manually?
>     sudo ln /root/tarsnap-cache/directory.tmp /root/tarsnap-cache/directory
> 
> I'm expecting it to say "Permission denied".  That would be good
> news -- it means that we can investigate the permission problem
> with shell commands.
> 
> Could you please send me the output of
>     ls -al /root/tarsnap-cache
> ?  (if the `ls` command gives you "Permission denied", try adding
> a `sudo` to it)
> 
> Cheers,
> - Graham Percival
> 
> On Tue, Jul 21, 2020 at 06:01:09PM +0000, Brendan K. wrote:
> > Hi,
> > I ran into a problem I cannot seem to solve. I use WSL on the latest version of Windows 10 and Ubuntu 20.04 LTS. I recently upgraded my host, so I had to reinstall Tarsnap on WSL. I am running Tarsnap as root, and I am trying to create an archive. In my tarsnap.conf file I set my cache directory to be in /root.
> > I am getting an error message that say's the following: "tarsnap: link(/root/tarsnap-cache/directory.tmp, /root/tarsnap-cache/directory): Permission denied"
> > 
> > I made sure permissions were set correctly on the tarsnap-cache directory (I have tried full rwx to everyone), and I have tried the default location in /usr/local/; none of this has worked and I get the same error message.
> > 
> > I made a second keyfile, but I have also tried to reuse my keyfile from before I upgraded my host but that didn't seem to work in creating an archive either; it let me extract from archives though.
> > 
> > I am using the basic command: sudo tarsnap -cvf "BACKUP_NAME" /mnt/c/Users/[USER]/Documents/tar-backup
> > 
> > I am at a loss as to why this is happening and I would greatly appreciate any help.
> > 
> > Thanks,
> > Brendan K.