Permission denied on write nfs share

Creating a bug report/issue

I have searched the existing open and closed issues

Required Information

  • DietPi version | core = 9, sub = 7, rc = 1, gitbranch = master, gitowner = MichaIng
  • Distro version | bookworm
  • Kernel version | Linux DietPi 6.1.0-25-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.106-3 (2024-08-26) x86_64 GNU/Linux
  • Architecture | amd64
  • SBC model | Native PC(x86_64)

Additional Information (if applicable)

  • Software title | Dietpi in vm on proxmox, Synology
  • Was the software title installed freshly or updated/migrated? Fresh
  • Can this issue be replicated on a fresh installation of DietPi? Yes
    ā† If you sent a ā€œdietpi-bugreportā€, please paste the ID here ā†’
  • Bug report ID | d8cf391b-3456-42ee-b70a-33c71143a2a4

Expected behaviour

  • write access to nfs share

Actual behaviour

  • sonar/radar have no write access to the shares, get ā€˜permission deniedā€™

Extra details

setup:
sinology with 3 nfs shares: movies, series, music
dietpi with sonar/radar
nfs shares are mounted

problem:
sonar/radar have no write access to the shares, get ā€˜permission deniedā€™

what I already did/check:
created a specific user called dietpi on synology
lots of other things, even started over with a fresh dietpi (this is where I am now, so itā€™s the latest version)
checked nfs permissions: ip correct, privilege = read/write, squash = no mapping (also tried map root to admin)

status:
pulling my hair out, only 3 hairs left, hope anyone can help

Following is not working? Permission denied for mounted folder - #7 by cvandingelen

Are you able to create files as user root?

Itā€™s the same problem (but on another site (sonarr/radarr this time)), but since itā€™s my own post, I did check the nfs permissions this time because that was the solution the last time. This time, that didnā€™t help though.

Iā€™m able to create files as the root user.

Pls share ls -la from the file system in question

total 16
drwxr-xr-x  7 root   root    4096 Sep  5 13:33 .
drwxr-xr-x 18 root   root    4096 Sep  5 10:39 ..
drwxrwxrwx  1 root   root   35526 Sep  2 08:39 c1paScorpioDataMovies
drwxrwxrwx  1 root   root      96 Jul  7 13:57 c1paScorpioDataMusic
d---------  1 root   root    2860 Sep  2 07:33 c1paScorpioDataSeries
drwxrwxr-x 10 dietpi dietpi  4096 Sep  5 11:13 dietpi_userdata
drwxrwxr-x  2 dietpi dietpi  4096 Aug 28 16:17 ftp_client


mmm, apparently itā€™s only ont the series share so to see in this
Thing is (just checked), the nfs permissions in my synology are the same for movies and series (and music).

Do you have an exact error message from a log file?

2024-09-05 17:00:37.8|Warn|ImportApprovedEpisodes|Couldn't import episode /mnt/dietpi_userdata/downloads/tv-sonarr/Only.Murders.in.the.Building.S04E01.720p.WEB.x265-MiNX[TGx]/Only.Murders.in.the.Building.S04E01.720p.WEB.x265-MiNX.mkv

[v3.0.10.1566] System.UnauthorizedAccessException: Access to the path '/mnt/c1paScorpioDataSeries/Only Murders in the Building' is denied. ---> System.IO.IOException: Permission denied
   --- End of inner exception stack trace ---
  at System.IO.FileSystem.CreateDirectory (System.String fullPath) [0x00191] in <d636f104d58046fd9b195699bcb1a744>:0 
  at System.IO.Directory.CreateDirectory (System.String path) [0x0002c] in <d636f104d58046fd9b195699bcb1a744>:0 
  at NzbDrone.Common.Disk.DiskProviderBase.CreateFolder (System.String path) [0x00047] in C:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Disk\DiskProviderBase.cs:190 
  at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.CreateFolder (System.String directoryName) [0x00079] in C:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:203 
  at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.EnsureEpisodeFolder (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Tv.Series series, System.Int32 seasonNumber, System.String filePath) [0x0006f] in C:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:166 
  at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.EnsureEpisodeFolder (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode, System.String filePath) [0x00000] in C:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:146 
  at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.CopyEpisodeFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode) [0x00026] in C:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:86 
  at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeEpisodeFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode, System.Boolean copyOnly) [0x0019b] in C:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\UpgradeMediaFileService.cs:73 
  at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import (System.Collections.Generic.List`1[T] decisions, System.Boolean newDownload, NzbDrone.Core.Download.DownloadClientItem downloadClientItem, NzbDrone.Core.MediaFiles.EpisodeImport.ImportMode importMode) [0x0029b] in C:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:109 

2024-09-05 17:01:02.9|Warn|StaticResourceModule|Couldn't find handler for /.well-known/gpc
2024-09-05 17:01:08.1|Warn|MediaCoverMapper|File /mnt/dietpi_userdata/sonarr/MediaCover/88/fanart.jpg not found
2024-09-05 17:01:10.7|Warn|MediaCoverMapper|File /mnt/dietpi_userdata/sonarr/MediaCover/88/poster.jpg not found

this is from sonarr

did you already tried to change permission on /mnt/c1paScorpioDataSeries??

chmod 777 /mnt/c1paScorpioDataSeries/

This way it would fit to Movies and Music folder

Changed it. ls -la gives the right permissions now, restarted sonarr, but still access denied

ls -la /mnt/c1paScorpioDataSeries/

then it shows a list of all my series, with all like this:

drwxrwxrwx 1 1030 users        24 Aug 17 22:47      'name of series'

can you reboot, do a test on sonarr and share the sonarr system log again?

Ok, a whole lot:

Here is the pastebin (had to do it this way, otherwise it was too long)

can you try following, this will create a test file as user sonarr and group dietpi

sudo -u sonarr -g dietpi touch /mnt/c1paScorpioDataSeries/Alias/demo.file
ls -la /mnt/c1paScorpioDataSeries/Alias/
root@DietPi:~# sudo -u sonarr -g dietpi touch /mnt/c1paScorpioDataSeries/Alias/demo.file
ls -la /mnt/c1paScorpioDataSeries/Alias/touch: cannot touch '/mnt/c1paScorpioDataSeries/Alias/demo.file': Permission denied
root@DietPi:~#

These are 2 separate commands, please execute them one after the other.

root@DietPi:~# sudo -u sonarr -g dietpi touch /mnt/c1paScorpioDataSeries/Alias/demo.file
touch: cannot touch '/mnt/c1paScorpioDataSeries/Alias/demo.file': Permission denied
root@DietPi:~# ls -la /mnt/c1paScorpioDataSeries/Alias/
total 8
drwxr-xr-x 2 root root    0 Sep  2 07:54  .
drwxr-xr-x 2 root root    0 Sep  2 07:33  ..
drwxr-xr-x 2 root root    0 Aug 24 02:12 'ALIAS (2001-2006) - Complete TV Series, Season 1,2,3,4,5 S01-S05 - 720p AMZN Web-DL x264'
-rwxr-xr-x 1 root root 5676 Aug 25 22:04  tvshow.nfo
root@DietPi:~#

as you can see, all files and folders are owned by user root. You would need to adjust file system permissions for all files and sub folders within /mnt/c1paScorpioDataSeries/ to allow other users like sonarr/radarr und group dietpi

And how would I do that? Is that in Synology or in dietpi (a command)?

you would need to execute following on your DietPi system

chown -R sonarr:dietpi /mnt/c1paScorpioDataSeries/
chmod -R 775 /mnt/c1paScorpioDataSeries/