Currently I have multiple different file systems that are home to my media: NTFS, FAT32, ext4.
I am controling access via group permissions. The group that owns the media has write access and I can add users like sonarr that run Sonarr to this group to let them write to the media I want access to.
This is why I apply file modes of 664 and 775 instead of 644 and 755. This works perfectly fine on my ext4 mount. However my log is filled with warnings whenever a file is creates on the NTFS file systems. That is because NTFS is agnostic of UNIX permissions - all files are 664/775 to begin with because of how I choose to mount their file systems using /ets/fstab
.
I suggest / offer to PR one of three things:
- Check the file mode before attempting to change it. In my case, files are alread 664, so trying to change to 664 is unnecessary. The failure can be avoided by one check beforehand.
- Check the file system. If it is NTFS or FAT32, don’t try to change the file’s mode on linux.
- Suppress the warnings if they are on NTFS/FAT32 systems.
It is worth noting that Sonarr does not require the group+write permission as the process is run by a user who owns the files it creates to begin with. 664 is just preferred by me to have consistent access control for my media and other users.