You are not logged in.
I am trying to get Jellyfin working over a network share, but jellyfin requires the network share be mounted to the local drive and permissions to read/write.
Problem is every time I try to mount it in --rw or -o rw I cannot change the ownership of the folder the dive is mounted to.
Every attempt just leaves the user and group as root no matter what I change.
Offline
Did you configure an user on the samba share? https://wiki.archlinux.org/title/Samba#User_management https://wiki.archlinux.org/title/Samba# … ermissions Did you then configure the client to properly mount that specific share path as your target user? https://wiki.archlinux.org/title/Samba#Manual_mounting - read the note and the man page linked there as well.
Last edited by V1del (2022-11-15 08:48:18)
Offline
The share is forced to user smbuser and group smbgroup. The user smbuser and smbgroup were then added to the host system.
Now when mounting and specifying a user without a password can I just use username= without the password= ?
Offline
Now when mounting and specifying a user without a password can I just use username= without the password= ?
Note:
If the uid and gid being used does not match the user of the server, the forceuid and forcegid options may be helpful. However note permissions assigned to a file when forceuid or forcegid are in effect may not reflect the the real (server) permissions. See the File And Directory Ownership And Permissions section in mount.cifs(8) §FILE AND DIRECTORY OWNERSHIP AND PERMISSIONS for more information.
To mount a Windows share without authentication, use "username=*".
<49,17,III,I> Fama di loro il mondo esser non lassa;
<50,17,III,I> misericordia e giustizia li sdegna:
<51,17,III,I> non ragioniam di lor, ma guarda e passa.
Offline
sudo mount -t cifs //192.168.1.100/videos /videos -o username=*,password=*,workgroup=WORKGROUP,iocharset=utf8,forceuid=smbuser,forcegid=smbgroup,rwThis is what I tried. error(22) invalid argument error
This is my host smb.conf file. Both user and group are created on host with proper permissions.
[global]
server string = Video Server
workgroup = WORKGROUP
security = user
map to guest = Bad User
name resolve order = bcast host
[videos]
path = /videos
force user = smbuser
force group = smbgroup
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
public = yes
writeable = yesLast edited by jddoxtator (2022-11-15 09:26:26)
Offline
I doubt you need to have the password field as well. Is smbuser and smbgroup the actual user/group you are starting jellyfin as?
Last edited by V1del (2022-11-15 09:27:45)
Offline
I doubt you need to have the password field as well. Is smbuser and smbgroup the actual user/group you are starting jellyfin as?
no, i'm logged in as the system wheel user. Do i need to mirror the accounts from host on client machine?
sudo mount -t cifs //192.168.1.100/videos /videos -o username=*,workgroup=WORKGROUP,iocharset=utf8,forceuid=smbuser,forcegid=smbgroupGave another invalid argument
Here is a thought, I created the folder on the client outside of mount with mkdir. Should I be allowing the mount command to make the dir?
Last edited by jddoxtator (2022-11-15 09:41:14)
Offline
Yes and no. For "properly" doing it it would be nice but if this is about jellyfin not complaining you need to appropriately change the uid/gid respectively forceuid/forcegid mount options to the local user whose perms you want to map to the share. They'll likely not map correctly on the server side but this shouldn't really matter, as long as the client thinks the files are his and they are relevantly mapped.
You had the mount working at one point no? Which invocation did you use there?
Last edited by V1del (2022-11-15 09:41:48)
Offline
Yes and no. For "properly" doing it it would be nice but if this is about jellyfin not complaining you need to appropriately change the uid/gid respectively forceuid/forcegid mount options to the local user whose perms you want to map to the share. They'll likely not map correctly on the server side but this shouldn't really matter, as long as the client thinks the files are his and they are relevantly mapped.
You had the mount working at one point no? Which invocation did you use there?
so forceuid and forcegid should be my client wheel user? e.g. jddoxtator02:users
Mount works without all the -o options
Last edited by jddoxtator (2022-11-15 09:44:11)
Offline
Yes, I'm assuming uid=/gid= would already suffice and they will have the uid/gid of the sambauser/group on the server side but be logically mounted to your user on the client side.
Offline
Progress, got this to work
sudo mount -t cifs //192.168.1.100/videos /videos -o uid=jddoxtator02,gid=usersnow I just need to get it to hold onto --rw so I can change ownership to jellyfin
ok
sudo mount -t cifs //192.168.1.100/videos /videos -o rw,uid=jddoxtator02,gid=usersgot me
drwxr-xr-x 2 jddoxtator02 users 0 Nov 14 15:22 videosI think that should work... time to try.
Edit: Nope, jellyfin still hangs trying to open folder, but it at least tries now.
Next thought, just mount as uid=jellyfin?
Last edited by jddoxtator (2022-11-15 09:58:44)
Offline
You can't arbitrarily change ownership after the fact on a normal cifs share. The uid=/ gid= need to be what you want them to be at mount time. How are you starting jellyfin? If you are starting that with the jellyfin user then yes you'd need to use that.
Last edited by V1del (2022-11-15 10:00:26)
Offline
You can't arbitrarily change ownership after the fact on a normal cifs share. The uid=/ gid= need to be what you want them to be at mount time. How are you starting jellyfin? If you are starting that with the jellyfin user then yes you'd need to use that.
starting jellyfin through systemctl as jddoxtator02, but is the service structure user account bound? I did try changing the uid to jellyfin, but jellyfin still hangs trying to add the folder.
Offline
If you aren't starting it with --user and seeing that this is intended to be a media server it will likely use it's own user, check the service file with
systemctl cat jellyfin.serviceOffline
[Unit]
Description=Jellyfin Media Server
After=network.target
[Service]
User=jellyfin
EnvironmentFile=/etc/conf.d/jellyfin
ExecStart=/usr/lib/jellyfin/bin/jellyfin --datadir ${JELLYFIN_DATA_DIRECTORY} --cachedir ${JELLYFIN_CACHE_DIRECTORY} ${JELLYFIN_ADD_OPTS}
Restart=on-abort
TimeoutSec=20
[Install]
WantedBy=multi-user.targetUser is indeed jellyfin, however setting jellyfin as the user and group still has no effect.
Jellyfin can see the directories, but when I go to add it, it just hangs with the blue rotating circle.
I've tried mount point with both of these
sudo mount -t cifs //192.168.1.100/videos /videos -o rw,uid=jellyfin,gid=jellyfin
sudo mount -t cifs //192.168.1.100/videos /videos -o rw,uid=jellyfin,gid=userOffline
Which might be just an issue with the network/how jellyfin wants to interact with it. Any error messages regarding the hang in the journal? Can you manually add files by switching to the jellyfin user and trying to create something? E.g.
sudo -u jellyfin touch /videos/jellyfincancreateherewhat are the currently exposed perms?
stat /videosOffline
sudo -u jellyfin touch /videos/jellyfincancreatehereresults in
sudo: the -U option may only be used with the -l option
usage: sudo -h | -K | -k | -V
usage: sudo -v [-ABkNnS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [-ABkNnS] [-g group] [-h host] [-p prompt] [-U user] [-u user] [command]
usage: sudo [-ABbEHkNnPS] [-C num] [-D directory] [-g group] [-h host] [-p prompt] [-R directory] [-T timeout] [-u user] [VAR=value] [-i|-s] [<command>]
usage: sudo -e [-ABkNnS] [-C num] [-D directory] [-g group] [-h host] [-p prompt] [-R directory] [-T timeout] [-u user] file ...
stat /videosresults in
File: /videos
Size: 0 Blocks: 0 IO Block: 1048576 directory
Device: 0,38 Inode: 10878977 Links: 2
Access: (0755/drwxr-xr-x) Uid: ( 967/jellyfin) Gid: ( 967/jellyfin)
Access: 2022-11-15 07:14:46.451247000 +0000
Modify: 2022-11-14 15:22:46.174406000 +0000
Change: 2022-11-14 15:22:46.174406000 +0000
Birth: 2022-11-14 15:22:46.174406000 +0000oops, top one was an entry error
sudo -u jellyfin touch /videos/jellyfincancreateheredoes nothing but print a new line
Last edited by jddoxtator (2022-11-15 10:41:29)
Offline
Could you go with this?:
- in your smb.conf set force user = jellyfin
- add jellyfin user to SAMBA users: https://wiki.archlinux.org/title/Samba#Adding_a_user
- chown -R jellyfin: /video
<49,17,III,I> Fama di loro il mondo esser non lassa;
<50,17,III,I> misericordia e giustizia li sdegna:
<51,17,III,I> non ragioniam di lor, ma guarda e passa.
Offline
did you check whether jellyfincancreatehere exists after the touch? According to the stat output the permissions on the dir are fine for the jellyfin user to write to.
Offline
Could you go with this?:
- in your smb.conf set force user = jellyfin
- add jellyfin user to SAMBA users: https://wiki.archlinux.org/title/Samba#Adding_a_user
- chown -R jellyfin: /video
Tried that, still hangs.
Offline
did you check whether jellyfincancreatehere exists after the touch? According to the stat output the permissions on the dir are fine for the jellyfin user to write to.
yes, folder was created
I'm going to hard reboot the server and see if that bring things around
just realized that I haven't updated this system in a while either. I think it's still on the old openssl.
Going to full system update and reboot.
Last edited by jddoxtator (2022-11-15 11:05:28)
Offline
Which permissions did the file have? As mentioned you might want to check your journal, e.g.
journalctl -u jellyfin -b on whether it leaves any messages as to why it hangs.
Offline
Which permissions did the file have? As mentioned you might want to check your journal, e.g.
journalctl -u jellyfin -bon whether it leaves any messages as to why it hangs.
ok, I have some interesting info in the log. Some network manager errors
Nov 15 11:00:57 Rig03 jellyfin[734]: [11:00:57] [ERR] [11] Jellyfin.Networking.Manager.NetworkManager: No interfaces information available. Resolving DNS name.
Nov 15 11:00:57 Rig03 jellyfin[734]: [11:00:57] [INF] [11] Jellyfin.Networking.Manager.NetworkManager: Defined LAN addresses : [10.0.0.0/8,172.16.0.0/12,192.168.0.0/16]
Nov 15 11:00:57 Rig03 jellyfin[734]: [11:00:57] [INF] [11] Jellyfin.Networking.Manager.NetworkManager: Defined LAN exclusions : []
Nov 15 11:00:57 Rig03 jellyfin[734]: [11:00:57] [INF] [11] Jellyfin.Networking.Manager.NetworkManager: Using LAN addresses: [10.0.0.0/8,172.16.0.0/12,192.168.0.0/16]Offline
These shouldn't matter since from the perspective of jellyfin your samba share is local. These NetworkManager messages are more likely to be relevant for the clients you'll eventually connect.
Offline
d.ALT wrote:Could you go with this?:
- in your smb.conf set force user = jellyfin
- add jellyfin user to SAMBA users: https://wiki.archlinux.org/title/Samba#Adding_a_user
- chown -R jellyfin: /videoTried that, still hangs.
Did you restart SAMBA service?
<49,17,III,I> Fama di loro il mondo esser non lassa;
<50,17,III,I> misericordia e giustizia li sdegna:
<51,17,III,I> non ragioniam di lor, ma guarda e passa.
Offline