RandomNinjaAtk / docker-lidarr-extended

lidarr-extended :: Lidarr application packaged with multiple scripts to provide additional functionality
GNU General Public License v3.0
275 stars 24 forks source link

[Bug]: PUID/PGID ignored somewhere #181

Closed stayupthetree closed 1 year ago

stayupthetree commented 1 year ago

Downloads fine, but can't import due to file permissions. When I go to the /downloads-lidarr-extended folder, the downloads are owned by root:root tree@irtree:/mnt/unionfs/downloads/lidarr/complete$ ls -luah total 12K drwxrwxr-x 3 tree tree 4.0K Jan 2 21:37 . drwxrwxr-x 5 tree tree 4.0K Jan 2 10:35 .. drwxrwxr-x 2 root root 4.0K Jan 2 21:42 'Taylor Swift-evermore (2020)-FLAC-165682731-TIDAL' tree@irtree:/mnt/unionfs/downloads/lidarr/complete$

Log error:

`[Warn] ImportApprovedTracks: Couldn't import track /downloads-lidarr-extended/complete/Taylor Swift-evermore (2020)-FLAC-165682731-TIDAL/14-closure-165682749.flac

[v1.1.1.2762] System.UnauthorizedAccessException: Access to the path '/downloads-lidarr-extended/complete/Taylor Swift-evermore (2020)-FLAC-165682731-TIDAL/14-closure-165682749.flac' is denied. ---> System.IO.IOException: Permission denied --- End of inner exception stack trace --- at System.IO.FileSystem.DeleteFile(String fullPath) at NzbDrone.Mono.Disk.DiskProvider.TransferFilePatched(String source, String destination, Boolean overwrite, Boolean move) in D:\a\1\s\src\NzbDrone.Mono\Disk\DiskProvider.cs:line 410 at NzbDrone.Mono.Disk.DiskProvider.MoveFileInternal(String source, String destination) in D:\a\1\s\src\NzbDrone.Mono\Disk\DiskProvider.cs:line 313 at NzbDrone.Common.Disk.DiskProviderBase.MoveFile(String source, String destination, Boolean overwrite) in D:\a\1\s\src\NzbDrone.Common\Disk\DiskProviderBase.cs:line 268 at NzbDrone.Common.Disk.DiskTransferService.TryMoveFileVerified(String sourcePath, String targetPath, Int64 originalSize) in D:\a\1\s\src\NzbDrone.Common\Disk\DiskTransferService.cs:line 498 at NzbDrone.Common.Disk.DiskTransferService.TransferFile(String sourcePath, String targetPath, TransferMode mode, Boolean overwrite) in D:\a\1\s\src\NzbDrone.Common\Disk\DiskTransferService.cs:line 389 at NzbDrone.Core.MediaFiles.TrackFileMovingService.TransferFile(TrackFile trackFile, Artist artist, List1 tracks, String destinationFilePath, TransferMode mode) in D:\a\1\s\src\NzbDrone.Core\MediaFiles\TrackFileMovingService.cs:line 126 at NzbDrone.Core.MediaFiles.TrackFileMovingService.MoveTrackFile(TrackFile trackFile, LocalTrack localTrack) in D:\a\1\s\src\NzbDrone.Core\MediaFiles\TrackFileMovingService.cs:line 87 at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeTrackFile(TrackFile trackFile, LocalTrack localTrack, Boolean copyOnly) in D:\a\1\s\src\NzbDrone.Core\MediaFiles\UpgradeMediaFileService.cs:line 79 at NzbDrone.Core.MediaFiles.TrackImport.ImportApprovedTracks.Import(List1 decisions, Boolean replaceExisting, DownloadClientItem downloadClientItem, ImportMode importMode) in D:\a\1\s\src\NzbDrone.Core\MediaFiles\TrackImport\ImportApprovedTracks.cs:line 217

[Warn] ImportApprovedTracks: Couldn't import track /downloads-lidarr-extended/complete/Taylor Swift-evermore (2020)-FLAC-165682731-TIDAL/15-evermore-165682750.flac

[v1.1.1.2762] System.UnauthorizedAccessException: Access to the path '/downloads-lidarr-extended/complete/Taylor Swift-evermore (2020)-FLAC-165682731-TIDAL/15-evermore-165682750.flac' is denied. ---> System.IO.IOException: Permission denied --- End of inner exception stack trace --- at System.IO.FileSystem.DeleteFile(String fullPath) at NzbDrone.Mono.Disk.DiskProvider.TransferFilePatched(String source, String destination, Boolean overwrite, Boolean move) in D:\a\1\s\src\NzbDrone.Mono\Disk\DiskProvider.cs:line 410 at NzbDrone.Mono.Disk.DiskProvider.MoveFileInternal(String source, String destination) in D:\a\1\s\src\NzbDrone.Mono\Disk\DiskProvider.cs:line 313 at NzbDrone.Common.Disk.DiskProviderBase.MoveFile(String source, String destination, Boolean overwrite) in D:\a\1\s\src\NzbDrone.Common\Disk\DiskProviderBase.cs:line 268 at NzbDrone.Common.Disk.DiskTransferService.TryMoveFileVerified(String sourcePath, String targetPath, Int64 originalSize) in D:\a\1\s\src\NzbDrone.Common\Disk\DiskTransferService.cs:line 498 at NzbDrone.Common.Disk.DiskTransferService.TransferFile(String sourcePath, String targetPath, TransferMode mode, Boolean overwrite) in D:\a\1\s\src\NzbDrone.Common\Disk\DiskTransferService.cs:line 389 at NzbDrone.Core.MediaFiles.TrackFileMovingService.TransferFile(TrackFile trackFile, Artist artist, List1 tracks, String destinationFilePath, TransferMode mode) in D:\a\1\s\src\NzbDrone.Core\MediaFiles\TrackFileMovingService.cs:line 126 at NzbDrone.Core.MediaFiles.TrackFileMovingService.MoveTrackFile(TrackFile trackFile, LocalTrack localTrack) in D:\a\1\s\src\NzbDrone.Core\MediaFiles\TrackFileMovingService.cs:line 87 at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeTrackFile(TrackFile trackFile, LocalTrack localTrack, Boolean copyOnly) in D:\a\1\s\src\NzbDrone.Core\MediaFiles\UpgradeMediaFileService.cs:line 79 at NzbDrone.Core.MediaFiles.TrackImport.ImportApprovedTracks.Import(List1 decisions, Boolean replaceExisting, DownloadClientItem downloadClientItem, ImportMode importMode) in D:\a\1\s\src\NzbDrone.Core\MediaFiles\TrackImport\ImportApprovedTracks.cs:line 217`

RandomNinjaAtk commented 1 year ago

Is your host a windows system?

Just basing this guess on the file paths that are showing... and it might be related to that.... Also, since no one else has reported a similar issue, I don't think there is a PUID/PGID issue, and because its all in the same container, it shouldn't be an issue.

Edit: You can also see in the below code/link, that the script sets the permissions of the downloaded files to the most permissible access available, so its some other external issue causing your problem...

https://github.com/RandomNinjaAtk/docker-lidarr-extended/blob/main/root/scripts/Audio.sh#L669

stayupthetree commented 1 year ago

I guess you aren't aware that sonarr, radarr, lidarr were written in .NET and use Mono, seeing D:\ in their errors is common regardless of where the app may be running, like my case in Ubuntu.

I don't doubt the rest of what you are saying and will dig deeper, but you should at least be aware of that.

RandomNinjaAtk commented 1 year ago

@stayupthetree any updates?

RandomNinjaAtk commented 1 year ago

Cannot reproduce, no response, closing...