WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: CHOWN HELP PLEASE  (Read 2997 times)

Offline grandma

  • Full Member
  • ***
  • Posts: 213
  • Never forget Grandma Loves You & made that candy4U
    • Back when a 10MB HD was $500 bucks
CHOWN HELP PLEASE
« on: July 14, 2021, 01:05:17 AM »
I zapped a USB folder(s) - plural - about 200 files and
fortunately had a very recent copy of ALL folders stuffed in /tmp - whoo hoo....

So I copied them back - whew - with a suduski cp -r command and now they are all owned by ROOT

I tried to chown them - permission denied. Did a suduski chown - nope.

What's the easiest way to go through each folder - about a dozen - and do them all.

I can write a loop.

ALSO - when I try to log in as ROOT / ADMIN it wants a password. That documentation doesn't appear in searching here...please email me si vous plais. Mucheski Graciosis.
~ Luv Grandma
"When children of all nations
play in the sandbox together
all morning-all day-all week, and
one fine sunny day; all year long ...
... then war will become an ancient memory
and Grandma can knit that sweater
you'll hold near to your heart
until long after you're my age.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: CHOWN HELP PLEASE
« Reply #1 on: July 14, 2021, 02:43:54 AM »
sudo chown will only fail if your filesystem doesn't support ownership, like fat32.
The only barriers that can stop you are the ones you create yourself.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: CHOWN HELP PLEASE
« Reply #2 on: July 14, 2021, 09:56:25 AM »
Hi grandma
... So I copied them back - whew - with a suduski cp -r command and now they are all owned by ROOT ...
Is that supposed to be  sudo ? If you are gonig to ask for help, show the commands exactly as you entered them.
Frankly, I had no idea what you meant. But then again, I don't expect people to replace parts of commands with
words they made up because they think it's clever.

The command you wanted was (assuming you actually need to use sudo):
Code: [Select]
sudo cp -a
You can find out what that means just by asking:
Code: [Select]
tc@E310:~$ busybox cp --help
BusyBox v1.29.3 (2018-12-19 15:29:37 UTC) multi-call binary.

Usage: cp [OPTIONS] SOURCE... DEST

Copy SOURCE(s) to DEST

        -a      Same as -dpR
        -R,-r   Recurse
        -d,-P   Preserve symlinks (default if -R)
        -L      Follow all symlinks
        -H      Follow symlinks on command line
        -p      Preserve file attributes if possible
        -f      Overwrite
        -i      Prompt before overwrite
        -l,-s   Create (sym)links
        -T      Treat DEST as a normal file
        -u      Copy only newer files
tc@E310:~$