On Mon, Apr 20, 2009 at 2:38 PM, Dennis d'Entremont <dennis.dentremont@xxxxxxxxx> wrote: > ok that part is pretty straight forward. But maybe I didn't explain myself > properly or ask the question in the right way before so here's another shot. > > Scenario: I have one user on my system called TheNerd. I grant him > permissions to write to /dev/sda5 and /dev/sda6. I set up two build profiles > (same as above but for each seperate partition) called partition5 and > partition6. No matter which one I run "TheNerd" can build and then write to > either partition without sudo. > > Question 1: What prevents me from messing up one of the build profiles (say > making them both write to /dev/sd6) and overwriting one with the other? Sorry, i didn't clarify that the method I use is basically this: svn up sudo chmod o+r /dev/sda && sudo chmod o+rw /dev/sda2 (some would suggest perhaps making scripts that do this for you, but i don't mind typing it out each time I need it) jam -q @disk Since I generally ALWAYS reboot after building (to test said partition) the permissions are removed for me next time and I'm forced to reset them. This would be my suggested solution for newb's... Even with all the builds I do (sometimes several within 15 minutes when testing something out), this still doesn't bother me, and I'm generally fine with it. If you really want to give yourself automatic permissions to wipe out anything on your machine, that's still your choice of course - but at least limit yourself to only those partitions you know you can wipe out. Imagine the day when something unexpectedly goes horribly wrong wipes the entire disk instead of a single partition (Hint: you put /dev/sda into your UserBuildConfig by accident)... You'll probably be wishing you had the added level of sanity in your process ;) > Question 2 (depending on answer 1): Should I create two users on the linux > system for this? i.e. TheNerd5 and TheNerd6 one with write access to > /dev/sda5 and the other with write access to /dev/sda6. This would > essentially prevent me from writing to any partition other than the one that > it's supposed to (so long as access is granted properly and I don't use > sudo). > > Question 3: If the multiple user accounts is the way to go... Do I need to > download seperate versions of the source? One for each user? (my guess would > be yes, especially, if I was building gcc2 with one and gcc4 with the other) See answer to #1 - basically if you only grant what you need when you need it, you should be covered. It's pretty standard practice these days anyway rather than running as "root" whenever you do something... > Honestly, I am not trying to be difficult. I really am trying to understand > how this is supposed to work. My apologies if I've missed the blatently > obvious. Basically, I would only suggest permitting what you must - I know I said something about adding yourself to the disk group, but honestly, I would discourage that as well. This is pretty well off-topic for this mailing list - where's that documentation area where we can discuss this stuff and maintain a single location for these "best practices"? ;) - Urias ----------------------------------------------------------------------- haiku-web@xxxxxxxxxxxxx - Haiku Web & Developer Support Discussion List