Skip to content

fix: use 770 permissions instead of 700, fixes multi user installs #3356 #3357

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zjeffer
Copy link

@zjeffer zjeffer commented Mar 23, 2025

Something is still creating backups in ~/.local/state/spicetify/ with 700 permissions, need to investigate further..

@zjeffer zjeffer force-pushed the feat/zjeffer/support-multi-user branch from c63fa6e to daecbc0 Compare March 23, 2025 20:11
@zjeffer zjeffer changed the title Use 770 permissions instead of 700, fixes multi user installs #3356 fix: use 770 permissions instead of 700, fixes multi user installs #3356 Mar 23, 2025
@rxri
Copy link
Member

rxri commented May 23, 2025

did you test it and is it ready for review or...?

@zjeffer
Copy link
Author

zjeffer commented May 24, 2025

It doesn't fully work, I need to investigate why ~/.local/state/spicetify is still being created with 700 permissions. I haven't had time yet but might soon.

@rxri
Copy link
Member

rxri commented May 24, 2025

It doesn't fully work, I need to investigate why ~/.local/state/spicetify is still being created with 700 permissions.

you sure? because you changed CheckExistAndCreate to use 0770 which is used in GetStateFolder function to create a dir if it doesn't exist

@zjeffer
Copy link
Author

zjeffer commented May 24, 2025

Just tested it again with a clean slate, by:

  • Removing /opt/spotify and /opt/spicetify-cli
  • Uninstalling spotify and spicetify-cli using my package manager
  • Reinstalling spotify, chmodding /opt/spotify and /opt/spotify/Apps with a+rw like it says in the wiki
  • Rebuilding spicetify-cli from my branch with go build -o spicetify

Running ./spicetify backup from the repo creates a ~/.local/state/spicetify/ folder with 700 permissions. Deleting the folder and trying it again now results in a folder with 750 permissions. Not sure what happened the first time, maybe I saw it wrong. Tried it again a couple of times from a clean slate and it now keeps creating the folder with 750 permissions.

Now calling ./spicetify restore makes /opt/spotify/Apps have the same 750 permissions, because it copies the state folder of course.

@zjeffer zjeffer force-pushed the feat/zjeffer/support-multi-user branch from daecbc0 to 9aeaafe Compare May 24, 2025 20:46
@rxri
Copy link
Member

rxri commented May 31, 2025

why does it create them with 750 tho instead of 770

@zjeffer
Copy link
Author

zjeffer commented May 31, 2025

Yeah that's what I'm confused about 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants