LSchallot / JellyRoller

CLI Jellyfin Controller Utility for Linux and Windows
GNU General Public License v2.0
48 stars 3 forks source link

OS DirectoryCreationFailed when run as www-data? #36

Closed Eir-nya closed 2 months ago

Eir-nya commented 5 months ago

Hi, I understand this might be far from the expected use case, but I still figured I'd post.

I'm trying to set up JellyRoller in conjunction with a custom site running php. I've set up a button to create a user using php's exec function. But when running any JellyRoller command, I get this output:

Error: DirectoryCreationFailed(Os { code: 13, kind: PermissionDenied, message: "Permission denied" })

I've already set www-data (user that runs the php service) as the owner of both the executable and the folder it's in. This happens when running any JellyRoller command, including -h or -v, or even without arguments. I'm not creating a directory as any part of this. Is JellyRoller trying to create a directory when run?

LSchallot commented 5 months ago

JellyRoller does create a directory when executed to store its configuration files. This is a default part of confy (the library used to store the configuration). Something I could look into is adding the ability to specify a configuration file. This would allow you to store the configuration file alongside the JellyRoller executable.

Eir-nya commented 5 months ago

That would be great! In the meantime, here's a workaround:

XDG_CONFIG_HOME=/path/to/custom/jellyroller/directory jellyroller list-users

This causes the jellyroller config to be generated/saved at /path/to/custom/jellyroller/directory/jellyroller/jellyroller.toml. Support for specifying a config would still be cool though :)

LSchallot commented 2 months ago

Ability to use a JellyRoller.config file that lives alongside the executable has been added to the project. It will be included in the 0.5.0 release.