I had met a problem.I want use "RunTime.exec()" to run cmd in my web app while the tomcat service doesn't start as adminstrator and has no privilege to run cmd. So ,if there has a way to start the service as adminstrator auto but not manual click the tomcat.exe ?
how to start tomcat service as administrator
4.9k Views Asked by Yong At
1
There are 1 best solutions below
Related Questions in TOMCAT
- Best way to pass an environment variable to several config files
- Openshift context path
- KeyStore file is not found in jar, although present in jar
- phpseclib of how to get PID and kill
- Unable to connect database of lamp instance from servlet running on tomcat instance of google cloud
- Spring and Tomcat: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
- How can I get a custom header from the client in Tomcat?
- why lost Mysql connection pool after a period?
- Eclipse Java EE + Bitnami Tomcat Stack
- Service not starting using Spring-boot during integration tests
- Image not loading in web page and says 404 error
- Maven Tomcat plugin - 404 WebServlet not found
- How to deploy a spring boot MVC application in traditional tomcat webapps folder?
- Tomcat Manager is not accessible in multi-domain configuration
- JSP return Jasper Exceptions on my friend's pc's when it works on mine
Related Questions in SERVICE
- Debugging Windows Services while starting
- Error in Calling some service in WCF Client
- i want to create a service that does the login functionality?
- I run an EXE program from a Windows Service but I can't see form C#?
- Android check WIFI status (disconnected or user changed WIFI)
- Having two sequential steps running within a windows service
- Approach for performing long running tasks in .NET
- android - How to get a iBecon detection state when I kill app from Background?
- Symfony2 global function in entity
- Return more that one entity in RESTful response?
- angular unit testing $scope.$on in a service not working
- Are there drawbacks to leaving a SqlConnection open long-term?
- Android control music with headset buttons in a service
- Socket in service on Android writing to server but not reading
- What does the dot mean in Symfony service names?
Related Questions in RUNTIME
- Get height for RecyclerView child views at runtime
- Memory allocation of local variables within nested {}
- Runtime set property from a string
- Scala: binding time
- What is a runtime environment for supposedly "no-overhead" systems languages?
- iOS 7 runtime headers method invoke
- VBA Run-time error '13'
- Runtime.getRuntime().exec(__);
- how to start tomcat service as administrator
- Runtime Error Message Java
- How to change the delay of sleep/timer thread in android during runtime?
- How to prevent shutdown hook from getting deadlock?
- design application that can create instances of class while running
- Runtime.getRuntime.exec("color 0a") not working?
- Spring factory method
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
There's one principle that you shall always keep in mind: An application that you can reach from the internet must always be run with as minimal permissions as possible. This totally (always!) rules out to run as an administrator. In case someone finds a security issue in your application, you don't want to provide them with free administrator privileges on top.
Even the permission to execute
cmdis questionable to have for an internet-reachable process. In a hardened system this would rather be the task of another server, running with different privileges (again, not administrator) that your webserver (tomcat) would connect to.As quickfix you might want to provide the CMD execution permissions to the user that your tomcat runs on. As a very-quick-fix you might change the tomcat service configuration - where you configure that tomcat shall run as a service (and where you configure the list of autostarting services) you can also specify the user account that it runs under. I'm not giving exact instructions for the reasons given in the first two paragraphs - I wholeheartedly suggest that you change your approach.