Closed Dileep-Dora closed 3 months ago
We ran into a similar problem before where if a script trigged a remote download, then we must elevate privileges for the security manager: https://github.com/opensearch-project/OpenSearch/blob/3125b948029609f354d3153f8ca6391638daefc7/server/src/main/java/org/opensearch/index/store/remote/utils/TransferManager.java#L85
This appears to be the case where even before attempting a remote download we do an eviction from the cache, which results in deleting a local file. That part of the code does not elevate privileges:
I suspect the fix here is to move the AccessController.doPrivileged
call higher up in the call stack to cover this case.
Thanks for the insight @andrross, i'll test this fix.
Describe the bug
We're trying out searchable snapshots. we've taken snapshot and restored as remote searchable index on search nodes. also we've a scripted field defined.
When querying getting the below exception.
but the required file permissions are there
0755
Related component
Search:Searchable Snapshots
To Reproduce
Expected behavior
It should not throw any exception and should work like regular search i.e scripted field on a normal index vs remote index(restored from snapshot as remote).
Additional Details
Opensearch version: 2.13