• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

Windows Server 2019 (UAC?) is interferring with WAR file

 
Bartender
Posts: 1792
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have noticed that on Windows Server 2019 (did not happen on Windows Server 2016), my Tomcat web app cannot access certain folders (like /Users/Administator/ ...). Also, the web app cannot process "c:\program files\ ....".

If I move the directories directly underneath the root (C:\), the web app can access sub directories with no problems.

The same web app running on Windows 10 (or Mac) works fine regardless of where the directories are so something is happening on the server 2019 I don't understand.

The research I did thus far seems to indicate it "could be" Windows UAC.

It's odd that Windows Server 2016 did not have this issue so I'm not really sure what to do other than to fire up the registry editor and disable UAC.

Just wanted a double check here in case there's a better way to go about this.

Thanks,

-- mike
 
Saloon Keeper
Posts: 12728
277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Uhh have you checked that the account that Tomcat is running under has file access to the files/folders that it needs?
 
Mike London
Bartender
Posts: 1792
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:Uhh have you checked that the account that Tomcat is running under has file access to the files/folders that it needs?



Here's the thing, I've never needed to do any of that in the past.

Tomcat has Logon as: "Local Account". I'll change it to Administrator and see if that helps.

Will report back.

- mike
 
Mike London
Bartender
Posts: 1792
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yep, logging the Tomcat account on as administrator fixed the issue. I had never needed to do that so it didn't occur to me.

Happy when things are so easy to fix!

Thanks.

--mike
 
Stephan van Hulst
Saloon Keeper
Posts: 12728
277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Using a non-admin account should be fine, recommended even.

You just need to set your file permissions that that account has access to them.
 
Mike London
Bartender
Posts: 1792
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:Using a non-admin account should be fine, recommended even.

You just need to set your file permissions that that account has access to them.



Thanks
 
Saloon Keeper
Posts: 23268
158
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:Using a non-admin account should be fine, recommended even.



HIGHLY recommended. Typically a *n*x server will have a userid named "tomcat" to run under. DEFINITELY avoid running as an administrator. I'd hope that the Windows installers woulds do something similar, but apparently not, so you'll have to make one manually.

Tomcat, like all Java apps, has no magical powers regarding user/group privileges - in fact because of the write-onve/run-anywhere thing, cannot even alter its own user or grpup while running. So any and all files accessed by Tomcat (and tomcat webapps) must be accessible by whatever user Tomcat is running as.
 
Mike London
Bartender
Posts: 1792
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is only a testing server so I'm not really worried about having Tomcat log in as administrator

Trying to setup a new user with just the right file permissions seems like it would take "a while" knowing Windows.... LOL

Thanks,

-- mike
 
Tim Holloway
Saloon Keeper
Posts: 23268
158
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mike London wrote:This is only a testing server so I'm not really worried about having Tomcat log in as administrator

Trying to setup a new user with just the right file permissions seems like it would take "a while" knowing Windows.... LOL

Thanks,

-- mike



It's not that bad. Go to the Control Panel/users function, add a new user. Right-click on the Tomcat home directory and add the new (tomcat) user to its permission list. I'd give better instructions but I haven't worked with Windows for a very long time now and Microsoft randomly shuffles stuff around from release to release. Standard joke is "what's the 'Network Neighborhood' named now?"
 
Mike London
Bartender
Posts: 1792
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
LOL...thanks Tim!

--mike
reply
    Bookmark Topic Watch Topic
  • New Topic