Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 30th January 2007, 07:33 PM
greasyfingers Offline
Registered User
 
Join Date: Nov 2006
Posts: 12
Changing Owner and Group

I have just copied a lot of folders and files from one user home directory to another. But the Owner and Group remain set to the original user, and I need to change them to the new user - I don't need to change the permissions per se, just the asigned Owner and Group. Is this a job for chmod, and if so, could someone give me some guidance how to do it, please?
Reply With Quote
  #2  
Old 30th January 2007, 07:45 PM
Seve's Avatar
Seve Offline
Retired Community Manager
 
Join Date: Oct 2004
Location: The GTA, Ontario, Canada
Age: 54
Posts: 12,376
Hello:
To change the owner you can use the chown command
chown username:username -R /dir/dir1
this will change the ownership on a recursive basis for all the contents of /dir/dir1
You may want to have a look at the man page for chown first if you need more help.
Edit:
Sorry forgot to add the you can use the
chgrp command to change the group if you want
Once again, see the man page for chgrp for more information.

Seve
__________________
Registered Linux User: #384977
.................................................. ............
See the Links below for more Help and those much wanted extras ... :)

Last edited by Seve; 30th January 2007 at 07:59 PM.
Reply With Quote
  #3  
Old 30th January 2007, 09:24 PM
greasyfingers Offline
Registered User
 
Join Date: Nov 2006
Posts: 12
Got it.

Thanks, Steve.
Reply With Quote
  #4  
Old 30th January 2007, 09:51 PM
RupertPupkin's Avatar
RupertPupkin Offline
Registered User
 
Join Date: Nov 2006
Location: Detroit
Posts: 4,619
If you have any symbolic links in those directories, make sure to use the -h option for chown, so that the link ownerships get changed too (not just the link references).
__________________
OS: Fedora 18 x86_64 | CPU: AMD64 3700+ 2.2GHz | RAM: 2GB PC3200 DDR | Disk: 160GB PATA | Video: ATI Radeon 7500 AGP 64MB | Sound: Turtle Beach Santa Cruz CS4630 | Ethernet: Realtek 8110SC
Reply With Quote
Reply

Tags
changing, group, owner

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache docroot file permissions, owner & group lozd Servers & Networking 5 30th April 2006 10:38 AM
How to restore default owner and group? mikezang Using Fedora 1 26th December 2005 01:13 PM
My root folder' owner and group are named! mikezang Using Fedora 0 5th November 2005 05:36 AM
Changing file Owner/Group in bash yerfspd Using Fedora 5 12th May 2005 10:20 PM


Current GMT-time: 13:09 (Thursday, 23-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat