Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    How to restore group ownership


    Is there a way to restore the group ownership value to a previous state?

    What I did is I tried to change the group owning a folder but I targeted the wrong folder while doing so. Now I would like to correct the situation, but I don't know what group of users was owning the folder before the change. Is there any way I could, at least find out what group was owning the folder previous to the change?

  2. #2
    Linux Guru AlexK's Avatar
    Join Date
    Feb 2005
    By default, the group the folder belongs to is the same group that the owner belongs to.

    You can't see the prior owner of a file or folder. But you can try using chmod 640 <folder name> and it will assign RW permissions to owner, R permission to group and block everyone else from viewing it.

    the numbers are as follows:
    7 = Read Write Exec
    6 = Read Write
    4 = Read
    0 = Block

    when chmodding, the 1st number is for the owner's rights. 2nd is for group rights and 3rd is for other's rights.

  3. #3
    Linux Guru fingal's Avatar
    Join Date
    Jul 2003
    Birmingham - UK
    ... and there's the chown command for changing group ownership. For eg., chown fingal /fingal/myfile

    I've not really used it much myself though.
    I am always doing that which I can not do, in order that I may learn how to do it. - Pablo Picasso

  4. $spacer_open

Posting Permissions

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