Folder permission issues when starting a program as a service

Copper Contributor

Hi,

 

I'm installing a solution data center in a Windows Server 2019 environment, and when I set the NAS drive to a shared directory.

 

If run the bat file right away, Tomcat will run normally, but if start it as a service, it will not start normally, saying that do not have access to the nas folder.

 

The account running the bat file and the service logon account are the same and nas folder has been granted full access to the account.

What makes this difference?

 

Thanks.

4 Replies
Does the account have the 'Log on as a service' right? (GPO/Computer Configuration/Windows Settings/Security Settings/Local Policies/User Rights Assignment)
Yes, The 'log on as service' property in the local security policy contains the account
Does it work when using this to create the service? https://github.com/mturk/svcbatch

Any update ?