View previous topic :: View next topic |
Author |
Message |
l_bratch Guru
Joined: 08 Feb 2005 Posts: 494 Location: Jersey
|
Posted: Fri Sep 22, 2006 5:18 pm Post subject: Fixing permissions |
|
|
Is there any way to restore all persmisions on the filesystem to default?
I just copied a Gentoo build to another disk, but now root seems to own everything (root:root), and it's lost chmod permissions on everything, so normal users can hardly do anything.
It took around an hour to copy, so is there any quick way to restore permissions, or will I have to copy the whole thing again, but this time remembering to preserve permissions?
--preserve is the correct cp option to do this, yes? |
|
Back to top |
|
|
bluedevils Apprentice
Joined: 21 Jul 2004 Posts: 252 Location: Vancouver BC -> NYC, NY
|
Posted: Fri Sep 22, 2006 5:31 pm Post subject: |
|
|
-p is preserve, but I think -a is more complete. man cp.
-a, --archive
same as -dpR
--backup[=CONTROL]
make a backup of each existing destination file
-b like --backup but does not accept an argument
--copy-contents
copy contents of special files when recursive
-d same as --no-dereference --preserve=link
--no-dereference
never follow symbolic links
-f, --force
if an existing destination file cannot be opened, remove it and
try again
-i, --interactive
prompt before overwrite
-H follow command-line symbolic links
-l, --link
link files instead of copying
-L, --dereference
always follow symbolic links
-p same as --preserve=mode,ownership,timestamps |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|