Issue setting desktop background from sample script

I have a successful MDS workflow running that installs MacOS, copies some files to the desktop and should set the desktop background.

I am working from the sample script provided in the examples on Use MDS to Set Up macOS Dock and Background Image – Twocanoes Software

My wallpaper gets copied to the right location, but not set.

When I view my wallpaper in finder, the file seems to have odd permissions, to a point where I cannot read it, or open it.

Has anyone got a successful script running for setting the desktop background?

Thanks

Try looking at the permissions on it and see if it is a valid image file.

tim