File and Folder Permission Issues on Windows 10 running Plex Server

Having recently upgraded my main PC running a plex server with drobo storage I noticed some strange issues when playing media files.

Plex clients were occasionally unable to play video files of varying types. When trying to play these files directly from source on the host machine via VLC they appeared to play fine with no corruption issues present. It was only attempting to move these files did a permission error occur.

It turned out that a large number of files and folders had “special permission user” rights set instead of the normal “user” or “administrator” rights. I wasn’t able to to trace why this occurred but it was likely partly due to the Windows 7 to 10 upgrade. I had to take ownership back over the files and folders, I tested this on a single video file and it resolved the playback issue, the problem was that this effected hundreds or files and folders. There was no way I was going to go through and do all that manually.

Thankfully a command line tool came to the rescue in the form of Icacls, this is a command-line tool made to audit and modify file permissions. To review your existing permissions list or “Access Control Lists” or ACL run:

icals {parent folder name} /T

This will list all the rights of the Parent folder and because the /T parameter was passed the Parent folders subdirectories.

A number of tutorials online suggested backing up permissions incase something goes wrong. Having done a number of bios flashed motherboards in the past the value of backing up bios’s among other settings prior to flash/wiping them is not lost on me! To do this run the following command:

icacls {parent folder name}\* /save  acl-backup /T

This will back up the ACLs of the Parent directory and its subdirectories to a file named acl-backup saved in the directory the Icacls command was ran in.
To restore from this back up simply run:

icacls Documents /restore acl-backup

My issues were resolved by simply resetting the permissions on all files and folders with the following command:

icacls {parent folder name} /reset /T

This command enables permission inheritance on the folder specified and wipes out any custom permissions on subdirectories. Perfect!