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

sudo permissions #5

Open
rubenvarela opened this issue Sep 8, 2015 · 2 comments
Open

sudo permissions #5

rubenvarela opened this issue Sep 8, 2015 · 2 comments

Comments

@rubenvarela
Copy link

Instead of running with sudo, an option is to test if you can write to the destination file. If you can't, you could execute

sudo chown $(whoami):$(groups | cut -d' ' -f1) /Library/Caches/com.apple.desktop.admin.png

This will change the ownership of com.apple.desktop.admin.png thus allowing the user to change the image without sudo.

@rubenvarela
Copy link
Author

I don't know if theres's a shorter way of getting the group.

You can assume staff, but I don't know if that can change, or under what circumstances it does.

@chrisetheridge
Copy link
Owner

To be honest, I think the best would to just keep with sudo permissions. Or what do you think? I will gladly look at a PR implementing this :)

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

No branches or pull requests

2 participants