SQL Server 2016 SP1 + CU8 Installed on Windows Server 2016 Standard Edition.
Everything was working fine for a while and I was able to create databases until for some reason unbeknownst to me, a permissions issue popped up on my mounted volumes.
Msg 5123, Level 16, State 1, Line 1 CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file 'D:\MSSQL13.MSSQLSERVER\MSSQL\Data\UserDB\test.mdf'. Msg 1802, Level 16, State 4, Line 1 CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
The folder D:\MSSQL13.MSSQLSERVER\MSSQL\Data\UserDB is actually a volume mounted as a folder within the D:\MSSQL13.MSSQLSERVER\MSSQL\Data directory.
I googled around for hours and every link kept babbling on about ownership and icacls, and takecontrol, but that isn't the problem here. I want to be clear that the service account running SQL Server on this instance has FULL CONTROL over this mounted volume and what's above it too.
I verified Effective Access for the service account and it has explicitly granted FULL control.
My suspicion, is that it has something to do with granting permissions to a folder mounted as a volume instead of a disk. This i.s because in my tests, I can create a database with its files in the root of D:\ without any problems. D:\ is also a volume using the same type of storage.
Also, my own user has full control, but when I try to create a file, I get this warning.
Strangely enough, I can add a folder to the UserDB folder/volume without difficulty.
How do I make this volume, mounted as a folder in the D:\ drive writeable for the MSSQL account?