SQL Server NETWORK SERVICE account permissions

permissionsSecuritysql-server-2008windows-server-2008

My SQL Server Windows service is set to use the NETWORK SERVICE account.

The server is installed to C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL.

However looking at the permissions on that folder, NETWORK SERVICE does not have any permissions. The groups which are allowed access to that folder are…

  • CREATOR OWNER – who is this?
  • SYSTEM – sounds fine – so that Windows can access the folder I presume?
  • SQLServerMSSQLUser$Computer_Name$MSSQLSERVER – this is the interesting one – what is this?
  • Administrators
  • Users

If NETWORK SERVICE is a user with minimal permissions on the system and looks to the O/S as someone connecting from a network how does it have permissions to access any files in the SQL Server install folder?

Thanks.

Best Answer

See Setting Up Windows Service Accounts in the SQL Server documentation:

SQL Server uses a security group to set resource ACLs rather than using the service account directly, so changing the service account can be done without having to repeat the resource ACL process. The security group can be a local security group, a domain security group or a service SID.

During SQL Server installation, SQL Server Setup creates a service group for each SQL Server component. These groups simplify granting the permissions that are required to run SQL Server services and other executables, and help secure SQL Server files.

Depending on the service configuration, the service account for a service or service SID is added as a member of the service group during install or upgrade.

That's what SQLServerMSSQLUser$Computer_Name$MSSQLSERVER is.


About NetworkService Account:

The NetworkService account is a predefined local account used by the service control manager.

...

A service that runs in the context of the NetworkService account presents the computer's credentials to remote servers.

NOT, as you put it:

looks to the O/S as someone connecting from a network