Ubuntu Connection with Plex

Server Version#: Ubunut 20.04
Player Version#: Version 4.108.0
<If providing server logs please do NOT turn on verbose logging, only debug logging should be enabled>

Hello Community,
I have connected my external server via rclone under Ubunut.
The mounted path would be “/media/Multimedia” - via Linux or ls query I can also see the data from the other server, but in the Plex application I do not see this folder mentioned above, although the Plex user has been given permission to the path.

I am at a bit of a loss as to what I can do now to integrate the files into Plex.

In German:
Hallo Community,
ich habe unter Ubunut meinen externen Serve per rclone verbunden.
Der gemountete Pfad wäre “/media/Multimedia” - per Linux bzw. ls Abfrage sehe ich auch die Daten vom anderen Server, aber in der Plex Anwendung sehe ich diesen oben genannten Ordner nicht, obwohl der Plex User Berechtigung auf den Pfad bekommen hat.

Ich bin ein wenig ratlos, was ich jetzt noch tun kann, damit ich die Dateien in Plex integrieren kann.

Now i make a Search for Files:
i have many Fails in the console:

Couldn’t get size of file “/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/task/2178/root/proc/169/task/294/fd/4”: boost::filesystem::file_size: Symbolic link loop [system:40]: “/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/root/proc/169/task/2178/root/proc/169/task/294/fd/4”

I would first change the mount point to not use /media.

Nautilus / automounter uses /media . Crazy things are known to happen in there.
When Plex cannot see items in /media, but you can, then you are guaranteed this is a problem caused by the automounter (exclusive access to your username only)

The infinite symbolic link loop is not a good sign.
while likely caused by the combination of rclone and nautilus/automounter, I don’t remember the exact cause (it’s been a while).

I recommend changing the mount point directory first.

  1. Create new directory somewhere
  2. Set your username as owner
  3. Set 755 permissions
  4. Now perform the mount

See how PMS behaves with that. You should find it better behaved

i have now create /BoxMedia

Now the Scan look at so:
Console
Is it normal that it remains at 17.1 %?

and in the Path /BoxMedia" is not “BoxMedia”

However, I have set the authorization and even added the Plex user to the root group as a test

root:x:0:plex
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:syslog
tty:x:5:syslog
disk:x:6:
lp:x:7:
mail:x:8:
news:x:9:
uucp:x:10:
man:x:12:
proxy:x:13:
kmem:x:15:
dialout:x:20:
fax:x:21:
voice:x:22:
cdrom:x:24:
floppy:x:25:
tape:x:26:
sudo:x:27:
audio:x:29:
dip:x:30:
www-data:x:33:
backup:x:34:
operator:x:37:
list:x:38:
irc:x:39:
src:x:40:
gnats:x:41:
shadow:x:42:
utmp:x:43:
video:x:44:plex
sasl:x:45:
plugdev:x:46:
staff:x:50:
games:x:60:
users:x:100:
nogroup:x:65534:
systemd-journal:x:101:
systemd-network:x:102:
systemd-resolve:x:103:
systemd-timesync:x:104:
crontab:x:105:
messagebus:x:106:
input:x:107:
kvm:x:108:
render:x:109:
syslog:x:110:
uuidd:x:111:
tcpdump:x:112:
ssh:x:113:
systemd-coredump:x:999:
plex:x:998:
mlocate:x:114:

but the rights do not reach through:
root@vmd122137:~# ls -la /BoxMedia
total 4
drwxr-xr-x 1 root root 0 Nov 16 19:37 .
drwxr-xr-x 3 plex root 4096 Nov 16 19:36 …
drwxr-xr-x 1 root root 0 Apr 1 2023 Comics
drwxr-xr-x 1 root root 0 Jul 25 21:57 Dokus
drwxr-xr-x 1 root root 0 Nov 13 21:31 Filme

changed ownership of ‘/BoxMedia/Serien/backtothefuture.mkv’ from root:root to plex:plex

BUt:

drwxr-xr-x 1 root root 0 Nov 16 20:03 BoxMedia

When i Change the rights?

@marco_6118

  1. sudo umount /BoxMedia
  2. sudo chown -R your_username:your_username /BoxMedia
  3. chown 755 /BoxMedia

Now the base directory is ready

  1. sudo mount /BoxMedia — (knowing it is in /etc/fstab)
  2. If it now shows up as 755 root.root , this is OK.

Those permissions will work for you.

Is the other server a Linux box or are you using rclone (rclone requires allow_other in the mount options)

I use rclone, and i have this command :

rclone mount ftp:files /BoxMedia/ -vv --allow-other

I think the Username:username is here “plex”? because I don’t have another username

otsudo umount /BoxMedia ^C
root@vmd:~# sudo umount /BoxMedia
umount: /BoxMedia: not mounted.
root@vmd:~# sudo chown -R plex:plex /BoxMedia
root@vmd:~# chown 755 /BoxMedia
root@vmd:~# rclone mount ftp:files /BoxMedia/ -vv --allow-other

root@vmd122137:~# ls -la /BoxMedia/
total 4
drwxrwxr-x  1 dexx dexx    0 Nov 17 08:38  .
drwxr-xr-x 19 root root 4096 Nov 16 19:51  ..
drwxrwxr-x  1 dexx dexx    0 Jun  1 20:04  65.2023.German.1080p.DL.DTS.BluRay.y264-HQM
drwxrwxr-x  1 dexx dexx    0 Jun 18  2021  Act.of.Valor.2012.German.DL.PAL.HD2DVD.DVDR-Braunbaer
drwxrwxr-x  1 dexx dexx    0 Jun 18  2021  Air.Force.One.German.1997.DL.BDRiP.x264.iNTERNAL-NGE

I have create a extra User with the name dexx. The Account is in the root/sudo/plex group
Now i try it :

sudo umount /BoxMedia
sudo chown -R dexx:plex /BoxMedia
chown 755 /BoxMedia 

in Plex i dont see the /BoxMedia Directory

the strange thing is that I find data, but only 4 pieces

in the console:

You definitely have something wrong with the OS installation.

Let’s see if we can find it.

sudo bash
cd /proc
ls -laR 169

Copy/paste (highlight the text in the terminal window, right-click COPY, come to this reply window, PASTE)

You have something on the machine, running as root, which is misbehaving.


Last login: Fri Nov 17 20:03:14 2023 from 91.64.169.48
root@vmd122137:~# sudo bash
root@vmd122137:~# cd /proc
root@vmd122137:/proc# ls -laR 169
ls: cannot access '169': No such file or directory

In this, you have dexx:dexx, this is correct.
dexx:dexx should also own the mount point directory.

user plex:plex isn’t referenced here (not necessary) as the permissions are 755.

Go to your logs… Where are you now seeing the symbolic loop problem ?

Without stopping any processes / restarting anything – Which pid is it and what is running on that pid ?

Run the ls -laR against that pid

Yes, this is correct, but I have now checked under
/home/dexx/Multimeda and set the authorizations in advance

root@vmd122137:~# ls -laR
.:
total 19288
drwx------  7 root root     4096 Nov 16 19:33 .
drwxr-xr-x 19 root root     4096 Nov 16 19:51 ..
-rw-------  1 root root    13462 Nov 17 20:01 .bash_history
-rw-r--r--  1 root root     3340 Nov 14 23:21 .bashrc
drwx------  2 root root     4096 Nov 14 23:26 .cache
drwxr-xr-x  4 root root     4096 Nov 16 15:30 .config
drwxr-xr-x  3 root root     4096 Nov 15 08:23 .local
-rw-r--r--  1 root root      161 Dec  5  2019 .profile
-rw-r--r--  1 root root 19597496 Nov 15 12:28 rclone-current-linux-amd64.zip
drwxr-xr-x  2 root root     4096 Oct 19 11:30 rclone-v1.64.2-linux-amd64
drwx------  2 root root     4096 Nov 16 14:54 .ssh
-rw-r--r--  1 root root    96433 Nov 14 23:24 update.txt

./.cache:
total 8
drwx------ 2 root root 4096 Nov 14 23:26 .
drwx------ 7 root root 4096 Nov 16 19:33 ..
-rw-r--r-- 1 root root    0 Nov 14 23:26 motd.legal-displayed

./.config:
total 16
drwxr-xr-x 4 root root 4096 Nov 16 15:30 .
drwx------ 7 root root 4096 Nov 16 19:33 ..
drwx------ 2 root root 4096 Nov 16 15:30 htop
drwxr-xr-x 2 root root 4096 Nov 17 20:13 rclone

./.config/htop:
total 12
drwx------ 2 root root 4096 Nov 16 15:30 .
drwxr-xr-x 4 root root 4096 Nov 16 15:30 ..
-rw-r--r-- 1 root root  664 Nov 16 15:30 htoprc

./.config/rclone:
total 12
drwxr-xr-x 2 root root 4096 Nov 17 20:13 .
drwxr-xr-x 4 root root 4096 Nov 16 15:30 ..
-rw------- 1 root root  106 Nov 17 20:13 rclone.conf

./.local:
total 12
drwxr-xr-x 3 root root 4096 Nov 15 08:23 .
drwx------ 7 root root 4096 Nov 16 19:33 ..
drwx------ 3 root root 4096 Nov 15 08:23 share

./.local/share:
total 12
drwx------ 3 root root 4096 Nov 15 08:23 .
drwxr-xr-x 3 root root 4096 Nov 15 08:23 ..
drwx------ 2 root root 4096 Nov 15 08:23 nano

./.local/share/nano:
total 8
drwx------ 2 root root 4096 Nov 15 08:23 .
drwx------ 3 root root 4096 Nov 15 08:23 ..

./rclone-v1.64.2-linux-amd64:
total 60864
drwxr-xr-x 2 root root     4096 Oct 19 11:30 .
drwx------ 7 root root     4096 Nov 16 19:33 ..
-rw-r--r-- 1 root root     1504 Oct 19 11:26 git-log.txt
-rwxr-xr-x 1 root root 55885824 Oct 19 11:30 rclone
-rw-r--r-- 1 root root  2133861 Oct 19 11:10 rclone.1
-rw-r--r-- 1 root root  2293309 Oct 19 11:10 README.html
-rw-r--r-- 1 root root  1997029 Oct 19 11:10 README.txt

./.ssh:
total 12
drwx------ 2 root root 4096 Nov 16 14:54 .
drwx------ 7 root root 4096 Nov 16 19:33 ..
-rw-r--r-- 1 root root  222 Nov 16 14:54 known_hosts
root@vmd122137:~#

don’t put stuff in your home directory . it’s fraught with problems.

BETTER way to do this:

sudo mkdir /home/multimedia
sudo chown  dexx:dexx /home/multimedia
sudo chmod 755 /home/multimedia

Now change the mount to use /home/multimedia

root@vmd122137:~# rclone mount ftp:files /home/Multimedia/ -vv --allow-other
2023/11/17 20:22:40 DEBUG : rclone: Version "v1.64.2" starting with parameters ["rclone" "mount" "ftp:files" "/home/Multimedia/" "-vv" "--allow-other"]
2023/11/17 20:22:40 DEBUG : Creating backend with remote "ftp:files"
2023/11/17 20:22:40 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2023/11/17 20:22:40 DEBUG : ftp://IP:21/files: Connecting to FTP server
2023/11/17 20:22:40 DEBUG : ftp://IP:21/files: dial("tcp","IP:21")
2023/11/17 20:22:40 DEBUG : ftp://IP:21/files: > dial: conn=*fshttp.timeoutConn, err=<nil>
2023/11/17 20:22:40 INFO  : ftp://IP:21/files: poll-interval is not supported by this remote
2023/11/17 20:22:40 Fatal error: failed to mount FUSE fs: cannot open: /home/Multimedia/: open /home/Multimedia/: no such file or directory
root@vmd122137:~#