Find the answer to your Linux question:
Results 1 to 4 of 4
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 ...
  1. #1
    Just Joined!
    Join Date
    Aug 2007
    Posts
    28

    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?

  2. #2
    oz
    oz is online now
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,090
    Use chown again to change it back.

    Use su to obtain root permissions, and then type the following command:

    Code:
    chown new-owner name-of-file-or-directory
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

  3. #3
    oz
    oz is online now
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,090
    If you are interested in learning more about Linux commands, take a look at:

    LinuxCommand.org: Learn the Linux command line. Write shell scripts.
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

  4. #4
    Just Joined!
    Join Date
    Aug 2007
    Posts
    28
    Thanks, Ozar, for the solution & the recommendation.

    Regards,

    Ron

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...