LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-01-2007, 03:58 PM   #1
rn5a
Member
 
Registered: Aug 2007
Posts: 48

Rep: Reputation: 15
Question Opposite of chown


The chown command is used to change the user & the owner of a directory or file from root to the user so that the directory or file can be accessed or edited.

How do I revert the user & the owner back to root so that the directory or file no longer remains accessible or editable?
 
Old 09-01-2007, 04:07 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
The opposite of chown is......(drumroll)...chown

The imprecise syntax is:

chown username:groupname filename
either username or groupname can be omitted:
chown username filename
OR
chown :groupname filename

To go back to having root be the owner:
chown root filename
To have the command apply to **directoryname** + contents:
chown -R root directoryname
 
Old 09-01-2007, 08:01 PM   #3
rn5a
Member
 
Registered: Aug 2007
Posts: 48

Original Poster
Rep: Reputation: 15
Thanks, Pixellany, for your response & help.

Regards,

Ron
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
opposite of grep 3saul Linux - Software 8 04-21-2010 01:29 AM
Opposite of Steam BillyGalbreath General 25 06-19-2007 03:26 PM
Netatalk opposite phatbastard Linux - Software 2 11-18-2005 04:12 AM
what's the opposite of operator!() jhorvath Programming 5 11-02-2003 08:21 PM
Opposite to modprobe? Thymox Linux - Software 4 12-11-2002 10:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:32 AM.

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