Is it possible to rename or move a file outside of openhab?

Hey, I wonder if it is possible to create a rule that, when an item gets a command, rename or move a file outside openhab, ie the underlying OS or on a NAS. I use openhab2. Do bindings such as Exec Persistence work?

Not Exec Persistence but just the Exec binding or the executeCommandLine action. These let you execute the defined command line when the Item receives a command. One example:

Switch MoveFile "Move that file" <computer> {exec=">[*:mv /path/to/file /path/to/newfile]"}

NOTE: The openhab user must have permission to move the file

I do not see the Exec binding in the native OH 2 bindings list yet so you may have to use the OH 1.x binding. See

http://docs.openhab.org/addons/1xaddons.html

It works for a while and then it stop. How do I set permission?
Do not know if this is important but my openhab2 is installed on a unraid server using this docker:
https://hub.docker.com/r/openhab/openhab/

Presumably you are moving a file that is within the Docker container or mapped to a volume? Docker containers cannot see your main system’s file system without a folder being mapped to a volume inside the container.

I can’t help with why it works for awhile and then stops. Is it just the Item that stops working or OH 2 itself>

I’ve no experience with Unraind. But I can say that dealing with permissions and such between a Docker container and the host and between Docker images is really challenging to get right.