Is it possible to run program installed in root user by regular users?
GeneralThis forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is it possible to run program installed in root user by regular users?
Hi!
I have installed NCL in root user account. All the NCL script runs well in root user. I have 2 regular user accounts too. But none of NCL script runs in regular users account.Is there any method to make it run in 2 regular users as well or should I install NCL Program in both of regular accounts too?
You need to tell us what happens when a non-root user attempts to run the scripts. This will entirely determine what the proper solution to your problem will be.
If the scripts require "rootly privileges" in order to do their jobs, then the sudo facility will enable the scripts to be run with elevated privileges.
If, on the other hand, it is simply a matter of file-access ("ordinary users can't get to them, whereas root can by definition get anywhere"), then this is simply a configuration issue that really has nothing to do with root at all. (Root has X-ray vision and a super-duper flying suit, but mortals are the ones who actually need to use the program, so you need to adjust the file and directory permissions.)
Since root is commonly employed to install things, the command in question might have installed some configuration-files of some kind "in the home directory," or some other default location, which won't be appropriate for any other user. Once again, a configuration change.
As you can see, all of these are plausible explanations for what you've given us so far, and in every one of these cases the solution-statement is, "well, it depends ..."
Please pose additional questions so that we can help you, or, if you solve the problem yourself, post an explanation as to what you did and edit the title-line to include "[SOLVED]."
Last edited by sundialsvcs; 10-16-2012 at 10:34 AM.
Assuming that you followed all correctly (based on your earlier thread) ie. created environment variables in all users' logins, it seems that SYMLINK may be the option for you since the getting started file doesn't talk of multi user, client install etc.
In SYMLINK, you use normal link command (ln) with a -s flag.
It may be thus
ln -s ncl_files_installed_as_root a_sub_directory_under_your_home_directory
You still might get problems when two people open it at the same time (placement of scratch files etc).
I normally set up a "maintenance account," say maint (okay, okay, it's my VM/HPO mainframe days catching up with me at last ...), and this non-rootly user and the non-rootly group that he's the sole member of is responsible for maintaining /usr/local/anything, this being the place where all applications "of my own choosing" get put.
All of the scripts related to system maintenance are stored in this account (whose home-directory is not accessible to others), and this user of course owns all of the applications and their related files. This user has no special powers, so setuid is not an issue, but he's the only one with read/write permission to any of these files.
/usr/local/... is set up as one of the entries on the default PATH, library-path and so-on such that files in these areas are accessible to everyone (but inferior in the search-path order to any system-defined applications or commands).
All of this serves to create a three-level hierarchy of stuff:
Stuff defined by the distro, and maintained in the distro's appointed fashion.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.