this post was submitted on 24 Feb 2025
12 points (92.9% liked)

Linux

50548 readers
1286 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

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!

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 4 days ago

A few hints. For the user your using to log into SFTP the .ssh director must be somthing like 700. The directories above it must be somethin like 750 or 755. This is so you ssh keys are secure.

A far as any data directories you want to access, like 755, 775, or 777, depending on what you want. Also umask setting may matter for new files.

This is not Jellyfin specific just generally how this worka.