I accidentally changed file ownership of a folder in Windows 7 and now nobody can edit, copy, view, move it, etc. Not even the administrator account account can change it back.
I tried icacls
and takeown
in elevated command prompt in Windows 7 but that didn't work.
takeown /f \\SERVER\foo\bar\misc\ /a /r /d y
/icacls \\SERVER\foo\bar\misc\ /grant administrator:F SYSTEM:F everyone:F
Then I tried chown
and chmod
in Kali/Ubuntu and it keeps saying No such file or directory found.
sudo chown -R root smb://server/foo/bar/misc
Is there a way Kali-Linux or Ubuntu can override the ownership? Or maybe I'm missing a different way in Windows? The properties tab for the folder doesn't change, its greyed out, in a sense. The folder I need to change is located in a network server. (\\SERVER\foo\bar\misc
)