Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
feardamhan
Posts: 47 Joined: Tue Apr 28, 2020 12:51 pm
Post
by feardamhan » Fri Feb 19, 2021 6:04 pm
I get that thats what it says. But something is mis-reporting here I think.
Take a look at operations, carried out as the emby user on the command line
Code: Select all
emby@dietpi-server5:/mount/infrastructure/emby_config $ ls
backups linux test
emby@dietpi-server5:/mount/infrastructure/emby_config $ cd test/
emby@dietpi-server5:/mount/infrastructure/emby_config/test $ ls -l
total 0
drwxrwxrwx 2 emby users 0 Feb 17 17:22 'Emby Backup - 2021-02-17 17.22.57 - Auto'
drwxrwxrwx 2 emby users 0 Feb 17 22:57 'Emby Backup - 2021-02-17 22.57.7 - Auto'
drwxrwxrwx 2 emby users 0 Feb 17 23:10 'Emby Backup - 2021-02-17 23.10.0 - Auto'
drwxrwxrwx 2 emby users 0 Feb 18 09:25 'Emby Backup - 2021-02-18 09.25.24 - Auto'
emby@dietpi-server5:/mount/infrastructure/emby_config/test $ touch test.txt
emby@dietpi-server5:/mount/infrastructure/emby_config/test $ ls -l
total 0
drwxrwxrwx 2 emby users 0 Feb 17 17:22 'Emby Backup - 2021-02-17 17.22.57 - Auto'
drwxrwxrwx 2 emby users 0 Feb 17 22:57 'Emby Backup - 2021-02-17 22.57.7 - Auto'
drwxrwxrwx 2 emby users 0 Feb 17 23:10 'Emby Backup - 2021-02-17 23.10.0 - Auto'
drwxrwxrwx 2 emby users 0 Feb 18 09:25 'Emby Backup - 2021-02-18 09.25.24 - Auto'
-rwxrwxrwx 1 emby users 0 Feb 18 09:29 test.txt
emby@dietpi-server5:/mount/infrastructure/emby_config/test $ rm test.txt
emby@dietpi-server5:/mount/infrastructure/emby_config/test $ ls -l
total 0
drwxrwxrwx 2 emby users 0 Feb 17 17:22 'Emby Backup - 2021-02-17 17.22.57 - Auto'
drwxrwxrwx 2 emby users 0 Feb 17 22:57 'Emby Backup - 2021-02-17 22.57.7 - Auto'
drwxrwxrwx 2 emby users 0 Feb 17 23:10 'Emby Backup - 2021-02-17 23.10.0 - Auto'
drwxrwxrwx 2 emby users 0 Feb 18 09:25 'Emby Backup - 2021-02-18 09.25.24 - Auto'
drwxrwxrwx 2 emby users 0 Feb 18 09:29 'Emby Backup - 2021-02-18 09.29.15 - Auto'
emby@dietpi-server5:/mount/infrastructure/emby_config/test $ cd 'Emby Backup - 2021-02-18 09.29.15 - Auto'
emby@dietpi-server5:/mount/infrastructure/emby_config/test/Emby Backup - 2021-02-18 09.29.15 - Auto $ ls -l
total 0
-rwxrwxrwx 1 emby users 0 Feb 18 09:29 profile.txt
emby@dietpi-server5:/mount/infrastructure/emby_config/test/Emby Backup - 2021-02-18 09.29.15 - Auto $
feardamhan
Posts: 47 Joined: Tue Apr 28, 2020 12:51 pm
Post
by feardamhan » Fri Feb 19, 2021 6:05 pm
Plus I can do all the normal cp and mv operations
Code: Select all
emby@dietpi-server5:/mount/infrastructure/emby_config/test/Emby Backup - 2021-02-18 15.52.49 - Auto $ ls -l
total 1024
-rwxrwx--- 1 emby users 12 Feb 18 16:01 profile.txt
emby@dietpi-server5:/mount/infrastructure/emby_config/test/Emby Backup - 2021-02-18 15.52.49 - Auto $ cp /mount/infrastructure/software/STBEditor_V1.7.2_652HD.exe ./
emby@dietpi-server5:/mount/infrastructure/emby_config/test/Emby Backup - 2021-02-18 15.52.49 - Auto $ ls -l
total 2048
-rwxrwx--- 1 emby users 12 Feb 18 16:01 profile.txt
-rwxrwx--- 1 emby users 577536 Feb 18 2021 STBEditor_V1.7.2_652HD.exe
emby@dietpi-server5:/mount/infrastructure/emby_config/test/Emby Backup - 2021-02-18 15.52.49 - Auto $ mv STBEditor_V1.7.2_652HD.exe renamed.exe
emby@dietpi-server5:/mount/infrastructure/emby_config/test/Emby Backup - 2021-02-18 15.52.49 - Auto $ ls -l
total 2048
-rwxrwx--- 1 emby users 12 Feb 18 16:01 profile.txt
-rwxrwx--- 1 emby users 577536 Feb 18 16:02 renamed.exe
emby@dietpi-server5:/mount/infrastructure/emby_config/test/Emby Backup - 2021-02-18 15.52.49 - Auto $
feardamhan
Posts: 47 Joined: Tue Apr 28, 2020 12:51 pm
Post
by feardamhan » Fri Feb 19, 2021 6:11 pm
Is DietPi doing any sandboxing that could be effecting things?
As I say.....the permissions / config are identical between DietPi and Raspbian installations. Only the DietPi install is having this issue. So between all the manual permissions tests and the tests across different OSs it feels like its not a permissions issue at a user level but perhaps some kind of restriction around the emby-server process itself.
I dont proclaim to know much (nearly nothing actually) about sandboxing, but I know it does put an additional layer of restrictions around the process right?
MichaIng
Site Admin
Posts: 2628 Joined: Sat Nov 18, 2017 6:21 pm
Post
by MichaIng » Fri Feb 19, 2021 6:36 pm
Ohhh, I forget that Emby is as well .NET/mono-based. The bug is pretty sure this one:
https://github.com/MichaIng/DietPi/issues/3529
If it worked before, then probably Emby has updated internal libraries to Mono v6 or the related .NET core version that introduced the issue.
The only workaround is to mount the CIFS share with the emby user itself: In
/etc/fstab
change
uid=dietpi
of the CIFS mount to
uid=emby
.
feardamhan
Posts: 47 Joined: Tue Apr 28, 2020 12:51 pm
Post
by feardamhan » Fri Feb 19, 2021 7:16 pm
That sounds similar. Unfortunately, my fstab entry already looks like this
Code: Select all
//xxx.xxx.xxx.xxx/Infrastructure /mount/infrastructure cifs username=emby,password=emby,iocharset=utf8,uid=999,gid=995,file_mode=0770,vers=3.1.1,_netdev,nofail,noauto,x-systemd.automount
the uid of 999 and gid of 995 corresponds to emby user and group respectively
feardamhan
Posts: 47 Joined: Tue Apr 28, 2020 12:51 pm
Post
by feardamhan » Fri Feb 19, 2021 7:17 pm
I will add that this was all working before, with uid=1000 (ie dietpi) in the fstab....its only very recently with an update that its stopped working.
MichaIng
Site Admin
Posts: 2628 Joined: Sat Nov 18, 2017 6:21 pm
Post
by MichaIng » Fri Feb 19, 2021 7:24 pm
Ah okay sorry you posts above that already. Just to rule it out:
file_mode=0777
doesn't solve it either, does it?
Is DietPi doing any sandboxing that could be effecting things?
Not in case of Emby.
Since services sometimes come with strict internal hardenings, could you try to change the mount point to
/mnt/infrastructure
?
Also, please paste the systemd service content:
systemctl cat emby-server
feardamhan
Posts: 47 Joined: Tue Apr 28, 2020 12:51 pm
Post
by feardamhan » Fri Feb 19, 2021 7:29 pm
Code: Select all
root@dietpi-server5:~# systemctl cat emby-server
# /usr/lib/systemd/system/emby-server.service
[Unit]
Description=Emby Server is a personal media server with apps on just about every device.
After=network.target
[Service]
EnvironmentFile=/etc/emby-server.conf
WorkingDirectory=/opt/emby-server
ExecStart=/opt/emby-server/bin/emby-server
RestartForceExitStatus=3
User=emby
[Install]
WantedBy=multi-user.target
MichaIng
Site Admin
Posts: 2628 Joined: Sat Nov 18, 2017 6:21 pm
Post
by MichaIng » Fri Feb 19, 2021 7:33 pm
Okay, the systemd unit is not the issue
.
feardamhan
Posts: 47 Joined: Tue Apr 28, 2020 12:51 pm
Post
by feardamhan » Fri Feb 19, 2021 7:36 pm
Neither 0777 nor /mnt/infrastructure made a different unfortunately
I dont understand how emby can create a folder, and create a zero size file, but not save content to the file
Code: Select all
root@dietpi-server5:/mnt/infrastructure/emby_config/test# ls -l
total 0
drwxr-xr-x 2 emby root 0 Feb 18 17:28 'Emby Backup - 2021-02-18 17.28.46 - Auto'
drwxr-xr-x 2 emby root 0 Feb 18 17:34 'Emby Backup - 2021-02-18 17.34.45 - Auto'
drwxr-xr-x 2 emby root 0 Feb 18 17:45 'Emby Backup - 2021-02-18 17.44.56 - Auto'
drwxr-xr-x 2 emby root 0 Feb 18 17:45 'Emby Backup - 2021-02-18 17.45.3 - Auto'
drwxr-xr-x 2 emby root 0 Feb 19 00:10 'Emby Backup - 2021-02-19 00.10.0 - Auto'
drwxr-xr-x 2 emby root 0 Feb 19 12:49 'Emby Backup - 2021-02-19 12.49.37 - Auto'
drwxr-xr-x 2 emby root 0 Feb 19 17:02 'Emby Backup - 2021-02-19 17.2.14 - Auto'
drwxr-xr-x 2 emby root 0 Feb 19 18:28 'Emby Backup - 2021-02-19 18.28.49 - Auto'
drwxr-xr-x 2 emby root 0 Feb 19 18:32 'Emby Backup - 2021-02-19 18.32.32 - Auto'
drwxr-xr-x 2 emby root 0 Feb 19 18:34 'Emby Backup - 2021-02-19 18.34.26 - Auto'
root@dietpi-server5:/mnt/infrastructure/emby_config/test# cd Emby\ Backup\ -\ 2021-02-19\ 18.34.26\ -\ Auto/
root@dietpi-server5:/mnt/infrastructure/emby_config/test/Emby Backup - 2021-02-19 18.34.26 - Auto# ls -l
total 0
-rwxrwxrwx 1 emby root 0 Feb 19 18:34 profile.txt
root@dietpi-server5:/mnt/infrastructure/emby_config/test/Emby Backup - 2021-02-19 18.34.26 - Auto#
All these folders are auto created by the backup plugin.