#2989 Issue closed: ERROR: Failed to create '/tmp/rear.zzz/outputfs/server directory for OUTPUT_URL=sshfs://...

Labels: support / question, fixed / solved / done

mattpen opened issue at 2023-05-17 20:33:

  • ReaR version ("/usr/sbin/rear -V"):

Relax-and-Recover 2.4 / Git

  • If your ReaR version is not the current version, explain why you can't upgrade:

I installed with yum install rear on RHEL 7.9

  • OS version ("cat /etc/os-release" or "lsb_release -a" or "cat /etc/rear/os.conf"):

NAME="Red Hat Enterprise Linux Server"
VERSION="7.9 (Maipo)"

  • ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):

OUTPUT=ISO
OUTPUT_URL=sshfs://phet-admin@dtn.rc.int.colorado.edu/pl/active/phet/bayes-image
BACKUP_URL=sshfs://phet-admin@dtn.rc.int.colorado.edu/pl/active/phet/bayes-image

  • Hardware vendor/product (PC or PowerNV BareMetal or ARM) or VM (KVM guest or PowerVM LPAR):

Dell PowerEdge

  • System architecture (x86 compatible or PPC64/PPC64LE or what exact ARM device):

x86

  • Firmware (BIOS or UEFI or Open Firmware) and bootloader (GRUB or ELILO or Petitboot):

BIOS
GRUB

  • Storage (local disk or SSD) and/or SAN (FC or iSCSI or FCoE) and/or multipath (DM or NVMe):

local disk, Raid 5+1

  • Storage layout ("lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,LABEL,SIZE,MOUNTPOINT"):
# lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,LABEL,SIZE,MOUNTPOINT
NAME                    KNAME     PKNAME    TRAN   TYPE FSTYPE      LABEL  SIZE MOUNTPOINT
/dev/sda                /dev/sda                   disk                   10.9T 
|-/dev/sda1             /dev/sda1 /dev/sda         part                      1M 
|-/dev/sda2             /dev/sda2 /dev/sda         part ext4               500M /boot
`-/dev/sda3             /dev/sda3 /dev/sda         part LVM2_member       10.9T 
  |-/dev/mapper/os-root /dev/dm-0 /dev/sda3        lvm  xfs                 10G /
  |-/dev/mapper/os-swap /dev/dm-1 /dev/sda3        lvm  swap                32G [SWAP]
  |-/dev/mapper/os-var  /dev/dm-2 /dev/sda3        lvm  xfs                  6G /var
  |-/dev/mapper/os-home /dev/dm-3 /dev/sda3        lvm  xfs                 30G /home
  `-/dev/mapper/os-data /dev/dm-4 /dev/sda3        lvm  xfs                7.5T /data
/dev/sr0                /dev/sr0            sata   rom                    1024M
  • Description of the issue (ideally so that others can reproduce it):

Rear is failing to create the outputfs directory for an sshfs mount. I'm able to create the mount as root without error, but it fails when rear is operating. There are no AVC denials in the logs, or anything other than "Permission denied". This seems similar to https://github.com/rear/rear/issues/1875 but I'm using sshfs instead of nfs.

Command (as root): rear -d -v -D mkbackup

From the logs:

++ mkdir -p -v -m0750 /tmp/rear.TO0As4FbrYHT5Rt/outputfs/server
mkdir: cannot create directory '/tmp/rear.TO0As4FbrYHT5Rt/outputfs/server': Permission denied
++ Error 'Failed to create '\''/tmp/rear.TO0As4FbrYHT5Rt/outputfs/server'\'' directory for OUTPUT_URL=sshfs://user@server/path/to/backup-location'

If I run mkdir -p -v -m0750 /tmp/rear.TO0As4FbrYHT5Rt/outputfs/server in a shell as root, it creates the directory as expected without error.

  • Workaround, if any:

none

  • Attachments, as applicable ("rear -D mkrescue/mkbackup/recover" debug log files):

abjr commented at 2023-05-18 13:06:

Is "/path/to/backup-location" writable by "user" on "server"? If not you will get permission denied when trying to create the "server" sub-directory.

Remember that /tmp/rear.TO0As4FbrYHT5Rt/outputfs is a mount point. In order for the "server" sub-directory to be created, the backup location needs to be writable by "user".

mattpen commented at 2023-05-19 02:21:

Thanks for the tip @abjr. The backup location had incorrect permissions, and the backup worked after correcting them. I had misunderstood the order of operations, I thought rear was creating a directory for the mount point, not a directory on the mount point.


[Export of Github issue for rear/rear.]