If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below. ** If you are logged in, most ads will not be displayed. **

How to restore group ownership

Hi.

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?

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.