Aeioyoo Posted April 16, 2019 Share Posted April 16, 2019 We have custom scripts for mod installs that rename folders, move stuff etc. However, by default TCAdmin sets file permissions AFTER all custom scripts This means if you execute as service's user, it can't use any extracted files, which is an issue. Right now only solutions are having a seperate script which chowns the extracted files, or run as service user and risk unintended consequences. Link to comment Share on other sites More sharing options...
ECF Posted April 16, 2019 Share Posted April 16, 2019 You should put in a support ticket. Link to comment Share on other sites More sharing options...
Dennis Posted October 12, 2020 Share Posted October 12, 2020 TCAdmin should set permissions after the custom script has run. If you're using IronPython, scripts will never execute as the service's user. They'll always execute as an administrator. You can use the following to set correct permissions: from System import Environment, PlatformID from TCAdmin.SDK.Misc import Linux, Windows if Environment.OSVersion.Platform == PlatformID.Unix : if Linux.IsRoot() : Linux.SetDirectoryOwnerAutoDetect('/path/', True) else : owner = Windows.GetOwner(ThisService.RootDirectory) Windows.SetDirectoryOwner('C:\path\', str(owner), True) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now