[ 
https://issues.apache.org/jira/browse/NIFI-3015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15824737#comment-15824737
 ] 

ASF GitHub Bot commented on NIFI-3015:
--------------------------------------

Github user trixpan commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1422#discussion_r96322520
  
    --- Diff: nifi-assembly/pom.xml ---
    @@ -19,6 +19,10 @@ language governing permissions and limitations under the 
License. -->
         <artifactId>nifi-assembly</artifactId>
         <packaging>pom</packaging>
         <description>This is the assembly Apache NiFi</description>
    +    <!--Add a blank run.as in case RPM isn't being used -->
    +    <properties>
    +        <nifi.run.as />
    --- End diff --
    
    I got what you are saying. 
    
    The challenge is that the run.as user comes from a pom attribute before the 
RPM creation is started, meaning the the build-root used by the RPM packager 
already contains the correct run.as 
    
    The sequence seems to be:
    
    If -Prpm is enable used the line you highlighted above, if not, use 
https://github.com/apache/nifi/blob/master/nifi-assembly/pom.xml#L429
    
    The only other way I imagine being possible would be using sed to replace 
the `run.as=` with `run.as=nifi` prior to RPM the built-root folder?


> NiFi service starts from root user after installation
> -----------------------------------------------------
>
>                 Key: NIFI-3015
>                 URL: https://issues.apache.org/jira/browse/NIFI-3015
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 1.1.0
>         Environment: Centos 7.2
>            Reporter: Artem Yermakov
>            Assignee: Andre
>            Priority: Critical
>
> When install NiFi using command nifi.sh install, and then start NiFi by 
> command service nifi start, NiFi will start from user root.
> I suggest to run it from user nifi which is created during rpm installation.



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

Reply via email to