You are not logged in.
Pages: 1
Hi all,
I'm logged in as user bo, and I'm doing some backing up to a USB flash drive:
sudo getfacl -pR /home/bo/.cache/pacaur/ > /run/media/bo/ARCH_201708/payload/home-bo-.cache-pacaur.aclDoesn't work. Permission denied.
sudo getfacl -pR /home/bo/.cache/pacaur/ > /tmp/home-bo-.cache-pacaur.acl
sudo cp /tmp/home-bo-.cache-pacaur.acl /run/media/bo/ARCH_201708/payload/Works.
Why do I have to use an 'intermediate directory'?
Thanks, Loady
Last edited by loadlover (2017-08-18 13:08:53)
Offline
Did you check if your user has write permissions on /run/media/bo/ARCH_201708/payload ? The right side of the redirection is done as the currently logged in user not as root.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
In the first command the sudo privileges don't hold after the redirect.
I'd be more worried about why you're using sudo at all, your user should have access to the destination without it.
Offline
Well this is the problem..
The user *does* have read/write access to the USB flash drive, and accesses it regularly with no issues.
This is what I cannot understand. Having been flummoxed by this, I then sudo'd it to find that it still didn't work. I had to abandon the redirection.
Don't understand what's going on.
Offline
What happens if you do 'touch /run/media/bo/ARCH_201708/payload/testperms'?
When it doesn't work what's the output of 'id', 'stat /run/media/bo/ARCH_201708/payload' and 'getfacl -e /run/media/bo/ARCH_201708/payload'?
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Well, the redirection is working now. Didn't get a chance to test it whilst the problem existed. My best guess is.. actually I don't know.
By the way, does it matter whether I use getfacl's -q flag or not? I mean as far as a subsequent setfacl is concerned..
-q : Do not write commented information about file name and ownership. This is useful when dealing with filenames with unprintable characters.Thanks for all your help, though.
Offline
Pages: 1