Unauthorized access

Just wanted to add to this thread as we just ran into this situation last night.

TL;DR:
Temp workaround was to change the ownership (recursive) on all the jobsData\<jobnumber> and plugins\<jobnumber> directories, so I could delete them:

C:\ProgramData\Thinkbox\Deadline10\workers\gpu09\plugins\6360349c8e3a76235cfae847\
and C:\ProgramData\Thinkbox\Deadline10\workers\gpu09\jobsData\6360349c8e3a76235cfae847\

Once I deleted those jobsData\<jobnumber> and plugins\<jobnumber> directories, the deadline user was able to create the directories it wanted and it could start the render.

Long version:
New freelance user was on the workstation and had left without logging out, so deadline was rendering as that user during the day. In the evening, I logged that user out and then logged in as our “render user” (deadline) and that’s when we started getting those “unauthorized access” errors. I then logged back in as the new user and the job started to render; logged out and log back in as user deadline, and it starts to error again. Rebooting did not help.

On Windows 10: DL 10.1.23.6, Houdini 19.5.303, Redshift 3.5.08, users were interactive (not service)

=======================================================
Error
=======================================================
Attempted to perform an unauthorized operation.
=======================================================
Type
=======================================================
UnauthorizedAccessException
[snip]
=======================================================
Log
=======================================================
[snip]
2022-10-31 17:08:42:  ERROR: Scheduler Thread - Render Thread 0 threw an unexpected error: 
2022-10-31 17:08:42:  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022-10-31 17:08:42:  Exception Details
2022-10-31 17:08:42:  UnauthorizedAccessException -- Attempted to perform an unauthorized operation.
2022-10-31 17:08:42:  Exception.TargetSite: Int32 SetSecurityInfo(System.Security.AccessControl.ResourceType, System.String, System.Runtime.InteropServices.SafeHandle, System.Security.AccessControl.SecurityInfos, System.Security.Principal.SecurityIdentifier, System.Security.Principal.SecurityIdentifier, System.Security.AccessControl.GenericAcl, System.Security.AccessControl.GenericAcl)
2022-10-31 17:08:42:  Exception.Data: ( )
2022-10-31 17:08:42:  Exception.Source: System.Security.AccessControl
2022-10-31 17:08:42:  Exception.HResult: -2147024891
2022-10-31 17:08:42:    Exception.StackTrace: 
2022-10-31 17:08:42:     at System.Security.AccessControl.Win32.SetSecurityInfo(ResourceType type, String name, SafeHandle handle, SecurityInfos securityInformation, SecurityIdentifier owner, SecurityIdentifier group, GenericAcl sacl, GenericAcl dacl)
2022-10-31 17:08:42:     at System.Security.AccessControl.NativeObjectSecurity.Persist(String name, SafeHandle handle, AccessControlSections includeSections, Object exceptionContext)
2022-10-31 17:08:42:     at System.Security.AccessControl.NativeObjectSecurity.Persist(String name, AccessControlSections includeSections, Object exceptionContext)
2022-10-31 17:08:42:     at System.Security.AccessControl.NativeObjectSecurity.Persist(String name, AccessControlSections includeSections)
2022-10-31 17:08:42:     at System.Security.AccessControl.FileSystemSecurity.Persist(String fullPath)
2022-10-31 17:08:42:     at System.IO.FileSystemAclExtensions.SetAccessControl(DirectoryInfo directoryInfo, DirectorySecurity directorySecurity)
2022-10-31 17:08:42:     at FranticX.IO.Directory2.CreateWindowsDirectoryWithPermissions(String path, DirectorySecurity directorySecurity)
2022-10-31 17:08:42:     at Deadline.IO.DeadlineClientPath.a(String bwj, UserInfo bwk)
2022-10-31 17:08:42:     at Deadline.IO.DeadlineClientPath.CreateDirectoryWithMaxTwoUserAccess(String path, UserInfo additionalAllowedUser)
2022-10-31 17:08:42:     at Deadline.IO.DeadlineClientPath.GetDeadlineClientSlaveJobPluginsFolder(String workerName, String jobId, Boolean createIfMissing, Boolean updatePermissions, UserInfo jobUser)
2022-10-31 17:08:42:     at Deadline.Slaves.SlaveSettings.GetSlavePluginPath(String jobId, Boolean createIfMissing, Boolean updatePermissions, UserInfo jobUser)
2022-10-31 17:08:42:     at Deadline.Slaves.SlaveRenderThread.e(String ajs, Job ajt, CancellationToken aju)
2022-10-31 17:08:42:     at Deadline.Slaves.SlaveRenderThread.b(TaskLogWriter ajo, CancellationToken ajp)
2022-10-31 17:08:42:     at Deadline.Slaves.SlaveRenderThread.a()
2022-10-31 17:08:42:  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Some previous posts had said to check the perms under AppData:

However, there is a JobPreload script for Houdini and I could see that it was not executing it – actually there was no logging of it at all… just errors for GetDeadlineClientSlaveJobPluginsFolder , GetSlavePluginPath , etc.

Usually it would show:

2022-11-01 10:56:01: 0: INFO: Executing job preload script 'C:\ProgramData\Thinkbox\Deadline10\workers\gpu09\plugins\6360349c8e3a76235cfae847\JobPreLoad.py'
but I could not see any reference to it so I knew at least the correct location of the directories it was having trouble accessing.

Not quite sure why DL chose to complain about it this time. We’ve had new users before – where their account was used for gpu renders during the day and then in the evening, they had logged off and the render user “deadline” was logged in. Of course, I forgot to check the ACLs before I deleted those directories, we were in a render crunch…

1 Like