LinuxQuestions.org
Help answer threads with 0 replies.
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: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
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


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


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration