You are not logged in.

#1 2017-08-18 13:08:11

loadlover
Member
Registered: 2017-05-10
Posts: 103

Silly copying problem

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.acl

Doesn'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

#2 2017-08-18 13:16:47

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Silly copying problem

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

#3 2017-08-18 13:19:02

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Silly copying problem

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.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#4 2017-08-18 17:16:52

loadlover
Member
Registered: 2017-05-10
Posts: 103

Re: Silly copying problem

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

#5 2017-08-18 17:29:02

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Silly copying problem

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

#6 2017-08-20 21:55:57

loadlover
Member
Registered: 2017-05-10
Posts: 103

Re: Silly copying problem

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

Board footer

Powered by FluxBB