Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate data and config directories #69

Closed

Conversation

bmillemathias
Copy link

Add a new directory /data to put the shares in and config where the config stays.
Do not create default share by default

Fixes #67

linuxserver.io


  • I have read the contributing guideline and understand that I have made the correct modifications

Description:

Add a dedicated directory /data to put shares inside it. Now /config is solely for configuration items.
Sync directory (the share share) is not created by default anymore.

Benefits of this PR and context:

Provide a dedicated place to create share, before that, creating would be only under /config which not ideal.

How Has This Been Tested?

  1. I've installed the container on my server (x86_64) and run it using podman
  2. I added the ID of the server to the instance running on my personal computer
  3. I created a share ~/Music on my personal computer where all my music tunes are located
  4. I added the server to the share
  5. directory /data/Music was created on the container, and the synchronization started

Source / References:

#67

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening this pull request! Be sure to follow the pull request template!

@bmillemathias bmillemathias changed the title Separate data and config directory Separate data and config directories Dec 10, 2023
Add a new directory /data to put the shares in and config where the
config stays.
Do not create default share by default

Fixes linuxserver#67
@aptalca
Copy link
Member

aptalca commented Dec 10, 2023

Thanks for the PR, but I don't believe it would fix the linked issue (his issue was incorrect ownership on the mapped folder and this PR does not fix perms on that folder)

With that said, I also don't see much benefit to hardcoding a data folder. The config folder is meant for configuration and data, anything the container writes that is meant to be persistent. The readme lists example data folders, letting the user know they can map whatever path they like to use as source paths.

@bmillemathias
Copy link
Author

Hi

Thanks for the PR, but I don't believe it would fix the linked issue (his issue was incorrect ownership on the mapped folder and this PR does not fix perms on that folder)

For me it declaring the volume /data and tuning the data argument for the binary fixed issues I got before, but perhaps I misinterpreted the result. I use also a "specific" setup with podman in rootless mode.

With that said, I also don't see much benefit to hardcoding a data folder. The config folder is meant for configuration and data, anything the container writes that is meant to be persistent. The readme lists example data folders, letting the user know they can map whatever path they like to use as source paths.

Several points lead to do this change

  • I was not very satisfied to see that shares are created in /config by default (as this is defined as home), among those instance the default share ("Sync)". from my quick search "abc" is not allowed to create directory elsewhere.
  • I preferred to create one and only one dedicated place /data (set as home in syncthing) so user could set all shares inside (/data/music, /data/pictures. ...) instead of having to add each share to the config file (docker-compose.yml or whatever), and would require restart.

I have also a question toward the usage of /var/lib/syncthing, why is the directory created but not used ?

@LinuxServer-CI
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

Copy link

This pull request is locked due to inactivity

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[BUG] I Dont have permission to the only folder I gave it permission to
3 participants