Elasticsearch with non-root user - Backup restore is not working

We have a docker image for Elasticsearch where I added. a non-root user as it is required to fix some vulnerabilities. After adding non-root user, we are facing with the backup-restore functionalities. I am getting error like this in master node:
on the first line this error:

crond: can't open or create path/crond.pid: Permission denied
these exceptions:
org.elasticsearch.transport.RemoteTransportException: [mnjdjellxxx][xxxxxx][cluster:admin/repository/put]

Caused by: org.elasticsearch.repositories.RepositoryVerificationException: [indexid] path [instances/id/] is not accessible on master node
at org.elasticsearch.repositories.blobstore.BlobStoreRepository.startVerification(BlobStoreRepository.java:1276) ~[elasticsearch-7.10.0.jar:7.10.0]

Caused by: java.io.IOException: Unable to upload object [instances/id/file.dat] using a single upload

at org.elasticsearch.repositories.s3.S3BlobContainer.executeSingleUpload(S3BlobContainer.java:360) ~[?:?]

Caused by: org.elasticsearch.common.io.stream.NotSerializableExceptionWrapper: amazon_s3_exception: Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: xxxxxxxxxxx; S3 Extended Request ID:xcxxxxxxxxxxxxx)

at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1799) ~[?:?]

version: 7.10.0
the cluster is not able to verify the snapshot repository

We are able to add data and update data to document. but not able to restore it due to this above issue.

Please format your code/logs/config using the </> button, or markdown style back ticks. It helps to make things easy to read which helps us help you :slight_smile:

That doesn't look like an Elasticsearch error.

Can you share your config as well as the snapshot and restore commands you are running?

This issue got fixed. Due to lack of permission, we were not able fix the issue.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.