Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 09-01-2007, 03:58 PM   #1
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
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
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
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
Registered: Aug 2007
Posts: 48

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




Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:22 PM.

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