1

I want to run program with execution permissions set to group. Unfortunately bash says "Permission denided".

How can I run program as user different that root without giving ownership to this user? But relay on group permissions. Is it possible?

More details: I'm trying to run program as user 'user1'. This user belongs to group 'users'. Program permissions are:

-rwxr-xr-- 1 root users 4121 Jan 24  2013 /opt/apache-jmeter-2.9/bin/jmeter

2 Answers 2

3

See the sudo man page for more information. Try:

sudo -u user1 -g users /opt/apache-jmeter-2.9/bin/jmeter
2
  • Thanks, it works. But is it possible to setup permission that sudo will be not required?
    – Max
    Sep 14, 2013 at 14:16
  • 1
    @Max: I haven't used it, but I believe GNU userv has similar functionality. gnu.org/software/userv
    – Phoeey
    Sep 14, 2013 at 14:35
0

user1 must be a user who is part of the users group. To add it to users group, use the following command:

sudo adduser user1 users

After this, user1 should be able to execute /opt/apache-jmeter-2.9/bin/jmeter without any other permissions.

1
  • Already done, but doesn't work.
    – Max
    Sep 16, 2013 at 21:43

You must log in to answer this question.

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