2

I just installed my first Linux desktop (Ubuntu 12.04) and am playing around with it. I would like to download/install several pieces of software and make them only available to a new group, called widgets. I would then like to add my user to widgets.

I assume groupadd is the command I'll be using to create widgets. What I don't understand is how to install software so that widgets users have rwx access to it, and that non-widgets users have no (---) access to it.

Specifically, there are several programs I want to install via apt-get, as well as Eclipse which just comes as an ordinary executable JAR.

So I ask, how do I install programs via apt-get, as well a Eclipse, so that only widgets users have full access to them, and non-widgets users have no access to them (read, write or execute)? Then, how do I add myself (myUser) to widgets? Thanks in advance!

1 Answer 1

3

Something like:

  • create group like you said: groupadd widgets

  • chmod and chgrp (or chown) the files you want to limit access to

chmod 0770 /path/to/dir-or-binary

chgrp widgets /path/to-dir-or-binary

  • add user(s) to group:

usermod -a -G widgets myUser

2
  • Thanks @dewc (+1) - one followup for you: are programs "bound" to the user that installed them in any way? For instance, if I have 2 users, fizz and buzz, and only buzz is a member of widgets, and I download Eclipse logged in as fizz, is Eclipse always available to fizz users? Or do the commands you demonstrated above give me to change everything so that only buzz users can access it, even though I downloaded Eclipse as fizz? Thanks again!
    – pnongrata
    Apr 14, 2013 at 19:40
  • With chown and chgrp, you can change it so that only "buzz" users can access it. You'll most likely need to make this change as the root user as you can't give someone else ownership of your files or take ownership of someone else's files. I would recommend testing on something you don't mind breaking, like a simple shell script. I am not familiar with eclipse, but it is possible it needs a certain set of permissions as well.
    – dewc
    Apr 15, 2013 at 14:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .