LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-03-2003, 01:33 PM   #1
dkc_ace
Member
 
Registered: Dec 2002
Distribution: freeBSD 4.9/6.0
Posts: 194

Rep: Reputation: 30
changing users and group ownership


how would i go about changing the ownership of the user and group threw the console?

thanks
 
Old 02-03-2003, 02:03 PM   #2
shaggz
Member
 
Registered: Dec 2002
Location: FuNkYToWN
Distribution: SuSe, Gentoo, Fedora
Posts: 64

Rep: Reputation: 15
To change ownership you can use chown

chown owner file.tgz

Group would be
chgrp groupName file.tgz


Or you can do it all at once by

chown owner.groupgrp files.tgz
 
Old 02-03-2003, 02:10 PM   #3
dkc_ace
Member
 
Registered: Dec 2002
Distribution: freeBSD 4.9/6.0
Posts: 194

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by shaggz
To change ownership you can use chown

chown owner file.tgz

Group would be
chgrp groupName file.tgz


Or you can do it all at once by

chown owner.groupgrp files.tgz
well im trying to set the ownership of a folder. would it work the same?
 
Old 02-03-2003, 05:30 PM   #4
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
yes, it would....

chown user folder_name
 
Old 02-03-2003, 07:50 PM   #5
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
If you mean the folder(s) and all the files in it use -R.

chown -R user:group folder1 folder2
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
/etc/group - the group users empty Artanicus Linux - General 2 02-22-2005 04:25 AM
changing ownership and group of multiple files.. utanja Debian 3 02-21-2005 06:10 PM
changing the ownership djh Slackware 3 11-08-2004 04:16 AM
Changing ownership of folders Nurfen Linux - Newbie 1 08-01-2004 12:00 PM
unable to modify ownership or group as root bubblehead Linux - Newbie 0 11-24-2003 09:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration