Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm really a novice in Linux. I'm currently running an OpenSUSE version and I would like to run a program that was installed by root as a non root user.

In other words, how do I configure the "sharing" settings to run this program as a non-root user?

share|improve this question
For example, which program are we talking about? – slhck Nov 29 '11 at 10:32
this works probably, su <username> <programname>.. – Vineet Menon Nov 29 '11 at 10:48
Use the absolute path to the program. It's possible other users don't have that particular directory (e.g. /usr/local/sbin) on their path. – Daniel Beck Nov 29 '11 at 19:36

It doesn't matter who installed the binary, it matters what the permissions are.

To run the file, UNIX would: check to see if you are the file owner: if so, do you have execute perms?

If not the file owner, are you in the same group: if so, do you have execute perms?

If neither owner or in the group: Does 'other' have execute perms?

Most software installed by 'make install' would give execute perms to all of user, group, and other, and you must by definition be in one of those groups.

What does ls -l say?

(*) Small caveat, to execute the file, you need execute perms, but to even see it you need perms on the directories that contain the file as well. This is rare, and I'm sure the executable permissions are more important at this point.

share|improve this answer
Thanks for the reply,i m trying to run a software,which runs only on its working directory that is installed be root.I can only run the program if i go to its directory and run it,but as a non-root user i cannot go to the directory because i dont have the permission,what should i do in this case? – hari Dec 1 '11 at 12:22

Just change the access rights:

chmod a+x file

But be careful. How did you install the program? Normally, programs install (through rpm or make install) with sufficient and correct rights.

share|improve this answer
Thanks for the reply,i installed through make install – hari Nov 29 '11 at 13:01
@hari Unrelated to the question but I would advise against using make install as root. Usually make install should be used to install to a temporary directory as part of the process of compiling a package for your OS. --- That aside, one thing I'd check is where it installed to. make install will usually default to /usr/local/bin, which is not always in the user's $PATH. If you can't run the installed program, I'd check that echo "$PATH" shows /usr/local/bin somewhere in there. If not, you'll need to add that to your $PATH (the procedure to do this varies by distro). – Score_Under Jan 16 at 18:18

You must log in to answer this question.

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