Tiny Core Linux

Tiny Core Extensions => TCE Tips & Tricks => Topic started by: grandma on July 13, 2021, 10:05:17 PM

Title: CHOWN HELP PLEASE
Post by: grandma on July 13, 2021, 10:05:17 PM
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.
Title: Re: CHOWN HELP PLEASE
Post by: curaga on July 13, 2021, 11:43:54 PM
sudo chown will only fail if your filesystem doesn't support ownership, like fat32.
Title: Re: CHOWN HELP PLEASE
Post by: Rich on July 14, 2021, 06: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:~$