0

I feel like I really ought to be able to figure this out, and it's a bit embarrassing to admit that I can't, but...

I have a Mint 21 server running Plex Media Server, and my media drive is a 12TB internal drive formatted with BTRFS (thinking about switching to XFS, but that's a lot of work). In order for Plex to be able to see new files that I add or replace, they need to be created with 0755 permissions. I know that BTRFS doesn't recognize the umask mount option, and I've tried to create a number of different UDEV rules to do it, but so far none of them have worked. After I add a new show or movie, I have to SSH in and manually chmod it, and that's getting old.

What's the best way to do this so that files are created correctly?

[EDIT] The media volume is mounted remotely via sshfs and that's how I manage files. I've already tried setting a umask on the sftp server in /etc/ssh/sshd_config like so and it had no effect:

Subsystem sftp /usr/lib/openssh/sftp-server -u 022 
3
  • 1
    "BTRFS doesn't recognize the umask mount option" – Implementations of various filesystems that do not or cannot support native ownership/mode model of Linux tend to provide options like uid=, gid= and umask= to overcome the limitation (to a point). Btrfs fully supports the model, it does not need such workaround. Instead, one can and should create every single file with independent ownership and mode desired for this specific file. How do you "add or replace" files? This action needs to be tweaked, not the mount. Commented Jul 1, 2024 at 18:45
  • The drive is mounted on my desktop via sshfs. I add and modify files that way. Commented Jul 1, 2024 at 20:57
  • What exact mode do you get then? Getting 755 without chmod may be impossible. It's quite peculiar that your Plex allegedly needs the execute bit in order to be able to see a new regular file. (For directories 755 makes sense.) Probably we have an XY problem here. How is your Plex configured regarding scanning/refreshing/updating the library? If you chmod +000, does this help like chmod 755 does? Commented Jul 2, 2024 at 4:01

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.