0

I have inadvertently changed the group ownership of the root directory on my Ubuntu Server 20.04 ☹️ Is there anyway to roll back the changes or reset the group ownership to out of the box (fresh install)?

I used the recursive option with the chgrp command which has obviously changed all files/folders below root. The command I used was sudo chgrp -R sambashare /

Any help or advice would be greatly appreciated

1 Answers1

0

I hope this works :)

I made files with

getfacl -R {dir} >{dir}.facl

for system related directories. Downloads:

Use

setfacl --restore={dir}.facl

to reset them. Warning: Change the bin and var file and replace rinzwind (my username) with your username in the bin and var file before doing this.

If sudo permissions are changed use a live session or grub rescue to do this. A live session will be the easier method if you have one.

Rinzwind
  • 309,379