lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Khludnev (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (SOLR-9760) solr.cmd on Windows requires modify permissions in the current directory
Date Tue, 20 Dec 2016 21:25:58 GMT

     [ https://issues.apache.org/jira/browse/SOLR-9760?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Mikhail Khludnev reassigned SOLR-9760:
--------------------------------------

    Assignee: Mikhail Khludnev

> solr.cmd on Windows requires modify permissions in the current directory
> ------------------------------------------------------------------------
>
>                 Key: SOLR-9760
>                 URL: https://issues.apache.org/jira/browse/SOLR-9760
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Server
>    Affects Versions: 6.3
>         Environment: Windows
>            Reporter: Alex Crome
>            Assignee: Mikhail Khludnev
>
> Currently starting solr fails if the user does not have permission to write to the current
directory.  This is caused by the resolve_java_vendor function writing a temporary file to
the current directory (javares). 
> {code}
> :resolve_java_vendor
> set "JAVA_VENDOR=Oracle"
> "%JAVA%" -version 2>&1 | findstr /i "IBM J9" > javares
> set /p JAVA_VENDOR_OUT=<javares
> del javares
> if NOT "%JAVA_VENDOR_OUT%" == "" (
>   set "JAVA_VENDOR=IBM J9"
> )
> {code}
> Rather than writing this temporary file to disk, The exit code of findstr can be used
to determine if there is a match.  (0 == match, 1 == no match, 2 == syntax error)
> {code}
> :resolve_java_vendor
> "%JAVA%" -version 2>&1 | findstr /i "IBM J9" > nul
> if %ERRORLEVEL% == 1 set "JAVA_VENDOR=Oracle" else set "JAVA_VENDOR=IBM J9"
> {code}
> By not writing this temp file, you can reduce the permissions solr needs.  As a work
around until this is fixed, you can start solr in a directory that has the required permissions,




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message