[Help] Unable to write files to an SMB share on a NAS
Edit: I found the solution! All I had to do was add the uid with my username, then I also had to add "forceuid" for it to actually go through. My fstab entry now looks like:
(The password is not actually "password" of course)
However, while I'm able to access the share perfectly fine, and even have a Jellyfin server reading from it, I cannot write files to the share without using sudo. I have some applications that manage metadata for music, and they're not able to change or add files in any way.
I am however able to access the share from my Fedora machine just fine with the same credentials, since I use KDE, I just added them to the default "Windows Share Credentials" setting. I don't have the issue where I have to use sudo to modify files, so I know it's just an issue with the share mounted to the server and not permission issues on the NAS itself.
Try adding to the fstab options uid=#### with the #### replaced with the user id you are using. If you are using more users other options may be needed.
Edit: also check 'man mount.cifs' for other options.
To amplify RedWeasel’s very good answer, fstab runs as root and unless you specify otherwise, the share will mount with root as the owner on the local machine. From the perspective of the Samba server, it’s the Jellyfin user accessing the files, but on the local machine, but local permissions come into play as well. That’s why you can get at the files when you connect to the share from Dolphin in your KDE system—it’s your own user that’s mounting the share locally.
From that link the comment starting with this paragraph below may work :
It occurs to me that as (a) I'm the only one accessing this share and (b) mode changes
are not written back to the CIFS filesystem anyway, it doesn't matter whether the mode
is 777 or 755. Therefore, the following fixes the issue: