# Logstash Ruby Filter

**URL:** <https://discuss.elastic.co/t/logstash-ruby-filter/248863>\
**Category:** Logstash\
**Created:** [September 16, 2020, 4:50pm UTC](https://discuss.elastic.co/t/logstash-ruby-filter/248863 "2020-09-16T16:50:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dede\_Pessu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dede_pessu/32/44473_2.png) [@Dede\_Pessu](https://discuss.elastic.co/u/Dede_Pessu)\
**Post date:** [September 16, 2020, 4:50pm UTC](https://discuss.elastic.co/t/logstash-ruby-filter/248863/1 "2020-09-16T16:50:15Z")

</div>

I am trying to perform file operations through the ruby filter in logstash.. For example  
`FileUtils.mv`: to move a file  
`FileUtils.chown`: to change file ownership

I am getting the following errors for trying to perform both actions as follows  
for FileUtils.mv: `[ERROR][logstash.filters.ruby] Ruby exception occurred: Permission denied - 'path/to/directory'`  
for FileUtils.chown: `[ERROR][logstash.filters.ruby] Ruby exception occurred: Operation not permitted - No message available`

not exactly sure why ruby is having issues performing these file operations, any ideas?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 14, 2020, 4:50pm UTC](https://discuss.elastic.co/t/logstash-ruby-filter/248863/2 "2020-10-14T16:50:26Z")

</div>

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