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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  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 offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    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

  3. #3
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    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

  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
  •