I run an unRAID server (unRAID is based on Slackware) and would like to find a way to automatically change the permissions and ownership of every file added to a specific directory.
Specifically, I would like to upload
.torrent files from my laptop to a specific "Watch" folder on my server using SFTP. The problem is that the rTorrent docker container that is watching that directory is unable to load the uploaded
.torrent files because their
owner:user group is different from that of the container --
.torrent files sent via SFTP, and
nobody:users for the container.
I suspect that the file permissions may also be an issue as the uploaded
.torrent files have
0644 permissions and I believe that they need to have
0755 permissions. I've been able to get rTorrent to autoload these
.torrent files by manually chown to
nobody:users and chmod to
0755, so I know that Autowatch works with these changes in place.
So, I am hoping that there might be a straightforward way to automatically chown and chmod every file added to this directory. Any ideas?