24 ms·
My alternative is to use multiple user accounts on my computer to work on different projects. This solves multiple issues at once: * Git identities (I just nee
by progval 7y ago
My alternative is to use multiple user accounts on my computer to work on different projects. This solves multiple issues at once:
* Git identities (I just need to clone from the right user)
* access restriction (building one compromised project won't compromise everything else)
* no need to manage virtualenvs (or the equivalent for non-python environments), just install everything in ~/.local/
- dewey 7y agoPersonally this wouldn't really work for me. I always switch between projects to get some files (Like a CI config I already wrote for another project) or look how I have done something in another code base. Also all my editor configs, bookmarks, browser logins for Github are all there. If I'd have to switch between users for each project that sounds really cumbersome.
- cvwright 7y agoI do what the GP describes as well. It’s not that bad. When you want to enable some limited sharing, it helps to create a new group for all your user accounts. For files and directories that you want to share, just set the group to your new user group, and use the OS group permissions to manage read/write/execute.
- progval 7y agoEverything I do is open source, so all my code is readable by all users. If you don't, see cvwright's answer. > Also all my editor configs My editor and shell configs are in /etc. Again, it may not work for everyone, as you may have to share the computer. > bookmarks, browser logins for Github are all there. If I'd have to switch between users for each project that sounds really cumbersome. Sorry, I was unclear. I don't logout/login every time I change project. I have a main user, and use sudo to run commands as other users (it even works with graphical apps, provided you whitelist them)
- scarejunba 7y agoThat sounds like just a group permissions issue in their model, and a shared mount model in the VM guy's model. These are pretty creative approaches using the built-in access control Unix has. I like it.
- elric 7y agoI used to do this, but I never found a good solution to scratch all the itches that come up when you go down that road. For instance you want to keep a variety of config in sync between all accounts -- except for the bits you don't. You want to be able to share some files between the accounts, but not others due to security concerns. You want to be able to access things like your password manager or mailbox, which again you may not want to share between accounts for security reasons. Sure, there are solutions to each of those problems, but in the end I found it required more discipline and effort than I was willing to put in, for what basically amounts to a small amount of additional security. I'd be happy to hear how you deal with those issues, however!