In the MSSQL folder (windows explorer), under the security tab I see this group or username: SQLServer2005MSSQLUser$ComputerName$MSSQLSERVER
Why is this there and what will happen if this is deleted when using xcacls.vbs for folder/file permissions.
SQL 2005 creates a number of local groups during the install process. BOL has the full details of this. They hold the service accounts used to run the various SQL services.
I have looked at deleting these groups but have decided against it. If you look in the SQL portion of the registry, you will references to the SIDs of some groups, the names of others, and prefixes for the rest.
There is no Microsoft or newsgroup documentation on what impact there will be on SQL if the groups are deleted. If anything does break, Microsoft may well ask you to reproduce the problem using a standard environment (with the groups) before they can properly support you. We have a regulatory requirement to use vendor-supported software, so for us the groups have to stay.
BOL = Books Online.
As to whether or not you can replace them? No. You should not. If you want to use domain groups, leave the local groups in place and grant similar rights to your domain groups.
Unfortunately, I don't think you can change the way SQL Server 2005 sets up itself. Typically, though, SQL Server is setup where the drives appear locally to the server where SQL Server is running. Do you not have an option of doing that?
You may have to end up contacting Microsoft Support. I believe it'll continue to be a problem, especially since I think it resets the permissions on the database files when they get created to use those local groups.
I registered a request with Microsoft that it should be possible during the install to specify the groups that SQL Server uses. The response was 'This will be considered for a future release'. I think the workaround you posted of moving the database files post-install is the best you will get in a NAS environment.
If you get a fix for SQL 2005, please let the community know.