Page 1 of 1

Struggling to fix permissions in media folder - solution found

Posted: Fri May 30, 2025 5:01 am
by PeachMan

I suspect my problem stems from a mistake during setup: I set the download location for qBittorrent incorrectly, so Radarr and Sonarr were both failing to import media. I think the error was "path not accessible by Radarr" or something similar. I fixed that in qBittorrent manually; it's now set to "/data/downloads/torrents". But I'm still getting "failed to import" errors, so I suspect my permissions are borked.

.env file (minus VPN settings):

Code: Select all

# Base configuration
PUID=1000
PGID=1000
MEDIA_DIRECTORY=/mnt/plexdrive
INSTALL_DIRECTORY=/opt/yams
MEDIA_SERVICE=plex

user groups:

Code: Select all

myuser@plexbuntu:~$ groups $USER
myuser: myuser adm cdrom sudo dip plugdev lxd docker

permissions in my media folder:

Code: Select all

myuser@plexbuntu:~$ ls -l /mnt/plexdrive
total 148
drwxrwxr-x    2 myuser myuser   4096 Apr 19 16:11 blackhole
drwxrwxr-x    2 myuser myuser   4096 Apr 19 16:11 books
drwxrwxr-x    3 myuser myuser   4096 May 29 03:24 downloads
drwx------    2 myuser myuser  16384 Apr 19 15:56 lost+found
dr-xr-xr-x 1371 myuser myuser 110592 May 23 21:29 movies
drwxrwxr-x    2 myuser myuser   4096 Apr 19 16:11 music
dr-xr-xr-x   86 myuser myuser   4096 May 18 01:09 tvshows

Aaaaand I'm just realizing what the issue is, my user doesn't have write permission! I was focused on permissions in the downloads folder, but it was permissions in the movies and tvshows folders that were borked. I just fixed it by changing permissions on those folders to 775:

Code: Select all

myuser@plexbuntu:/mnt/plexdrive$ chmod -R 775 movies
myuser@plexbuntu:/mnt/plexdrive$ chmod -R 775 tvshows
myuser@plexbuntu:/mnt/plexdrive$ ls -l
total 148
drwxrwxr-x    2 myuser myuser   4096 Apr 19 16:11 blackhole
drwxrwxr-x    2 myuser myuser   4096 Apr 19 16:11 books
drwxrwxr-x    3 myuser myuser   4096 May 29 03:24 downloads
drwx------    2 myuser myuser  16384 Apr 19 15:56 lost+found
drwxrwxr-x 1371 myuser myuser 110592 May 23 21:29 movies
drwxrwxr-x    2 myuser myuser   4096 Apr 19 16:11 music
drwxrwxr-x   86 myuser myuser   4096 May 18 01:09 tvshows

Now it works perfectly fine, media is being imported normally. I'm a little confused as to how some folders got correct permissions while others didn't, but I'll call this resolved and leave this here for the record, in case it helps anybody else.

P.S. I still have one question: Do I also need to change permissions on that lost+found folder? Or is that one intentionally more restrictive?


Re: Struggling to fix permissions in media folder - solution found

Posted: Fri May 30, 2025 12:49 pm
by rogs

Hey @PeachMan!

I love how you fixed the issue while explaining it :mrgreen: :mrgreen: :mrgreen:

You can leave the default permissions on the lost+found directory, it's totally fine.

Cheers!

Roger.