Logstash Ruby Filter

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?