Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fixing permissions
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
l_bratch
Guru
Guru


Joined: 08 Feb 2005
Posts: 494
Location: Jersey

PostPosted: Fri Sep 22, 2006 5:18 pm    Post subject: Fixing permissions Reply with quote

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
View user's profile Send private message
bluedevils
Apprentice
Apprentice


Joined: 21 Jul 2004
Posts: 252
Location: Vancouver BC -> NYC, NY

PostPosted: Fri Sep 22, 2006 5:31 pm    Post subject: Reply with quote

-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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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