I'm in the middle of Samba update on a number of servers, each with several shared directories. Users are authenticated against Windows domain AD, so I expect change in local UIDs on Linux boxes. I'd like to know if there is a way to dump ownership of all shared directories so I don't have to set it manually, but to restore it after upgrade.
you could do it by using a script.
1) Dump the directories (the names) in a file.
A filthy way to do it. It is recommended only if you are desperate :>
Also you may find useful
Solaris has an advantage here, as it has a nice command called
But you could use something like
You can use the
This works even if you don't have acls set - the tool will dump and restore standard unix fs permissions. It will also work if your filesystem doesn't have acl support turned on (it's a non-default mount option for most filesystems still)