Generate TincHost.name only when is not defined.
Fix resources permissions. Thanks Bart for reporting.