Skip to content

/etc/sysconfig/elasticsearch wrong permissions in RPM #37143

@santuari

Description

@santuari

Elasticsearch version: Version: 6.5.4, Build: oss/rpm/d2ef93d/2018-12-17T21:17:40.758843Z, JVM: 1.8.0_191

Plugins installed: []

JVM version:
openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)

OS version: CentOS Linux release 7.5.1804 (Core)

Description of the problem including expected versus actual behavior:
After installing elasticsearch official rpm the group of the file /etc/sysconfig/elasticsearch is overwritten by the spec file itself in the post section:
rpm -qV elasticsearch
S.5...GT. c /etc/sysconfig/elasticsearch

This is not best practice because user may restore the original group by using:
rpm --setugids elasticsearch

I expect that the files section of the spec file contains:
%config(noreplace) %attr(0664, root, root) /etc/sysconfig/elasticsearch
instead of:
%config(noreplace) %attr(0660, root, root) "/etc/sysconfig/elasticsearch"

Steps to reproduce:

  1. install elasticsearch on a Centos 7
  2. systemctl status elasticsearch should show elasticsearch running
  3. restore original group of elasticsearch by using rpm --setugids elasticsearch
  4. systemctl restart elasticsearch
  5. systemctl status elasticsearch shows that elasticsearch fails to start

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Delivery/PackagingRPM and deb packaging, tar and zip archives, shell and batch scriptsTeam:DeliveryMeta label for Delivery team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions