Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 700A3200BCE for ; Fri, 2 Dec 2016 20:29:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 6ED65160B27; Fri, 2 Dec 2016 19:29:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B89DE160B08 for ; Fri, 2 Dec 2016 20:28:59 +0100 (CET) Received: (qmail 46731 invoked by uid 500); 2 Dec 2016 19:28:58 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 46710 invoked by uid 99); 2 Dec 2016 19:28:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Dec 2016 19:28:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 96A512C1F54 for ; Fri, 2 Dec 2016 19:28:58 +0000 (UTC) Date: Fri, 2 Dec 2016 19:28:58 +0000 (UTC) From: "Alex Crome (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SOLR-9760) solr.cmd on Windows requires modify permissions in the current directory MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 02 Dec 2016 19:29:00 -0000 [ https://issues.apache.org/jira/browse/SOLR-9760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15716017#comment-15716017 ] Alex Crome commented on SOLR-9760: ---------------------------------- This same fix also fixes a problem with running solr in Azure Websites - https://stackoverflow.com/questions/40794626/unable-to-run-solr-on-azure-web-apps > 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 > > 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= 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