Context

I’m not very used to permissions based access so please forgive some of the ignorant attempts. For context, i have a jellyfin media server running on a mini PC. My previous way of transfering media to the server was using a secondary portable SSD and just plugging it in directly and moving the files to the main SSD. Originally the SSD was formatted to VFAT.

Issue

I had the idea that maybe using SFTP would allow me to just be able to drop in the files id like to host and simplify this process. With the original context above, I set up SSH and copied the id_rsa key over to the headless machine and launched sftp. This worked great but i was unable to add more files to the directory via SFTP, only read them.

Attempted

Skipping over discovering that VFAT is not linux permission friendly except on mounting options, I reformatted the drive to Ext4. This is where i began running into issues.

I relized the drive had permissions to root:root so i started trying to change them. First i made a group called jellyfin, and tried to run the following:

sudo chown mainuser:jellyfin /media/jellyfin

to try to set ownership to the mainuser while adding the jellyfin group to it. I then edited the same sftpuser to the jellyfin group. For the final file editing, i ran the following (initially tried 765 in hopes of 7 for owner, 6 for group, and 5 for everyone else):

sudo chmod 777 /media/jellyfin

I also set the starting sftp area for sftp user to that directory as well.

Current problem

Neither SFTP or Jellyfin is now able to see that directory path. On SFTP I’m getting “FATAL: Connection reset by peer” while on jellyfin im getting playback errors for all media as well as not able to discover new media i manually added to the drive.

On the actual vm console, im able to cd and view all files under sftpuser and verified I was able to add that user to the jellyfin group. Any advise here would be great. I’m also happy to provide more context as well.Thanks!

  • BCsven
    link
    fedilink
    arrow-up
    1
    ·
    1 day ago

    You may be able too ssh in as the media user and not root, so that permission is set properly for that user/group