# Operation not permitted when install Elastic Repository S3 plugin in version 7.17.15

**URL:** <https://discuss.elastic.co/t/operation-not-permitted-when-install-elastic-repository-s3-plugin-in-version-7-17-15/357758>\
**Category:** Elasticsearch\
**Created:** [April 19, 2024, 3:22am UTC](https://discuss.elastic.co/t/operation-not-permitted-when-install-elastic-repository-s3-plugin-in-version-7-17-15/357758 "2024-04-19T03:22:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dove-young](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dove-young/32/133625_2.png) [@dove-young](https://discuss.elastic.co/u/dove-young)\
**Post date:** [April 19, 2024, 3:22am UTC](https://discuss.elastic.co/t/operation-not-permitted-when-install-elastic-repository-s3-plugin-in-version-7-17-15/357758/1 "2024-04-19T03:22:39Z")

</div>

I tried to install repository-s3 plugin to a elastic installed in openshift cluster. I got `Operation not permitted ` error.

I have no idea whether this is because of `Licensed: false` or any other problems?

```auto
sh-5.1$ bash -x bin/elasticsearch-plugin install --verbose https://artifacts.elastic.co/downloads/elasticsearch-plugins/repository-s3/repository-s3-7.17.15.zip
++ dirname bin/elasticsearch-plugin
+ ES_MAIN_CLASS=org.elasticsearch.plugins.cli.PluginCli
+ ES_ADDITIONAL_CLASSPATH_DIRECTORIES=lib/tools/plugin-cli
+ bin/elasticsearch-cli install --verbose https://artifacts.elastic.co/downloads/elasticsearch-plugins/repository-s3/repository-s3-7.17.15.zip
-> Installing https://artifacts.elastic.co/downloads/elasticsearch-plugins/repository-s3/repository-s3-7.17.15.zip
-> Downloading https://artifacts.elastic.co/downloads/elasticsearch-plugins/repository-s3/repository-s3-7.17.15.zip
Retrieving zip from https://artifacts.elastic.co/downloads/elasticsearch-plugins/repository-s3/repository-s3-7.17.15.zip
[=================================================] 100%??
- Plugin information:
Name: repository-s3
Description: The S3 repository plugin adds S3 repositories
Version: 7.17.15
Elasticsearch Version: 7.17.15
Java Version: 1.8
Native Controller: false
Licensed: false
Type: isolated
Extended Plugins: []
 * Classname: org.elasticsearch.repositories.s3.S3RepositoryPlugin
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: plugin requires additional permissions @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
* java.lang.RuntimePermission accessDeclaredMembers
* java.lang.RuntimePermission getClassLoader
* java.lang.reflect.ReflectPermission suppressAccessChecks
* java.net.SocketPermission * connect,resolve
* java.util.PropertyPermission es.allow_insecure_settings read,write
See https://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
for descriptions of what these permissions allow and the associated risks.

Continue with installation? [y/N]WARNING: A Java agent has been loaded dynamically (/tmp/javaagent-loader-1.3.59.jar)
WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning
WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information
WARNING: Dynamic loading of agents will be disallowed by default in a future release
y
-> Failed installing https://artifacts.elastic.co/downloads/elasticsearch-plugins/repository-s3/repository-s3-7.17.15.zip
-> Rolling back https://artifacts.elastic.co/downloads/elasticsearch-plugins/repository-s3/repository-s3-7.17.15.zip
-> Rolled back https://artifacts.elastic.co/downloads/elasticsearch-plugins/repository-s3/repository-s3-7.17.15.zip
Exception in thread "main" java.nio.file.FileSystemException: /usr/share/elasticsearch/config/repository-s3: Operation not permitted
        at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:100)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
        at java.base/sun.nio.fs.UnixFileAttributeViews$Posix.setOwners(UnixFileAttributeViews.java:291)
        at java.base/sun.nio.fs.UnixFileAttributeViews$Posix.setOwner(UnixFileAttributeViews.java:313)
        at org.elasticsearch.plugins.cli.InstallPluginAction.setOwnerGroup(InstallPluginAction.java:1042)
        at org.elasticsearch.plugins.cli.InstallPluginAction.installConfig(InstallPluginAction.java:1016)
        at org.elasticsearch.plugins.cli.InstallPluginAction.installPluginSupportFiles(InstallPluginAction.java:939)
        at org.elasticsearch.plugins.cli.InstallPluginAction.installPlugin(InstallPluginAction.java:908)
        at org.elasticsearch.plugins.cli.InstallPluginAction.execute(InstallPluginAction.java:245)
        at org.elasticsearch.plugins.cli.InstallPluginCommand.execute(InstallPluginCommand.java:88)
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77)
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
        at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:95)
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
        at org.elasticsearch.cli.Command.main(Command.java:77)
        at org.elasticsearch.plugins.cli.PluginCli.main(PluginCli.java:36)
sh-5.1$ 

```

---

<div class="post-metadata">

**Author:** ![dove-young](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dove-young/32/133625_2.png) [@dove-young](https://discuss.elastic.co/u/dove-young)\
**Post date:** [April 19, 2024, 3:25am UTC](https://discuss.elastic.co/t/operation-not-permitted-when-install-elastic-repository-s3-plugin-in-version-7-17-15/357758/2 "2024-04-19T03:25:46Z")

</div>

I've tried to install plugin through an initContainer in `nodeSet`, but hit the same error.

```auto
  nodeSets:
    - name: default
      count: 3
      config:
        node.master: true
        node.data: true
        node.ingest: true
        node.store.allow_mmap: false
      podTemplate:
            spec:
              initContainers:
              - name: install-plugins
                securityContext:
                  allowPrivilegeEscalation: true
                  runAsUser: 0
                command:
                - sh
                - -c
                - |
                  bin/elasticsearch-plugin install --batch https://artifacts.elastic.co/downloads/elasticsearch-plugins/repository-s3/repository-s3-7.17.15.zip  

```

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 19, 2024, 7:07am UTC](https://discuss.elastic.co/t/operation-not-permitted-when-install-elastic-repository-s3-plugin-in-version-7-17-15/357758/3 "2024-04-19T07:07:27Z")

</div>

> [@dove-young](#):
>
> `Operation not permitted`

The error `Operation not permitted` comes from your operating system and the stack trace indicates that your system is forbidding you from changing the owner or group of something on disk.
