Giving access to non root users to run application | Unix Linux Forums | Red Hat

  Go Back    


Red Hat Red Hat is the world's leading open source technology solutions provider with offerings including Red Hat Enterprise Linux (RHEL), Fedora, open source applications, security and systems management, virtualization, and Services Oriented Architecture (SOA) solutions.

Giving access to non root users to run application

Red Hat


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-03-2010
jw_amp jw_amp is offline
Registered User
 
Join Date: Apr 2010
Last Activity: 3 August 2010, 2:41 AM EDT
Posts: 20
Thanks: 3
Thanked 1 Time in 1 Post
Giving access to non root users to run application

Hi All,

I have created an RPM installer and installed it via ROOT user & which works fine on Red Hat.
But the problem oocurs when a non root users try to run that application (from their account), it never got executed (being it has the execute permission i.e. chmod a+x somefile.sh).

I want that application should be easily run by the non-root user.

Any help?
The Following User Says Thank You to jw_amp For This Useful Post:
raj13aug (06-04-2010)
Sponsored Links
    #2  
Old 06-03-2010
verdepollo's Avatar
verdepollo verdepollo is offline
Registered User
 
Join Date: Mar 2010
Last Activity: 3 September 2014, 11:17 AM EDT
Location: Mexico
Posts: 725
Thanks: 11
Thanked 106 Times in 102 Posts
which application did you install?

What error message are you getting?

What about setuid?

As the owner, run:

Code:
chmod u+s /path/to/your/application

Sponsored Links
    #3  
Old 06-03-2010
jw_amp jw_amp is offline
Registered User
 
Join Date: Apr 2010
Last Activity: 3 August 2010, 2:41 AM EDT
Posts: 20
Thanks: 3
Thanked 1 Time in 1 Post
Quote:
Originally Posted by verdepollo View Post
which application did you install?

What error message are you getting?

What about setuid?

As the owner, run:

Code:
chmod u+s /path/to/your/application


Thanks for the reply.
The application is developed by our team internally and I created the RPM installer for the same.

As for the trial basis, I entered "su" command and provided the root password (as I know because of testing purpose) and later it works fine.

Is this right?

Also can you give a bit on "stuid" ?

thanks
    #4  
Old 06-03-2010
verdepollo's Avatar
verdepollo verdepollo is offline
Registered User
 
Join Date: Mar 2010
Last Activity: 3 September 2014, 11:17 AM EDT
Location: Mexico
Posts: 725
Thanks: 11
Thanked 106 Times in 102 Posts
Did you try?:


Code:
chmod u+s /path/to/your/application

After adding the setuid flag to your app you should be able to run the application with a standard user account.

Quote:
setuid and setgid (short for set user ID upon execution and set group ID upon execution, respectively) are Unix access rights flags that allow users to run an executable with the permissions of the executable's owner or group. They are often used to allow users on a computer system to run programs with temporarily elevated privileges in order to perform a specific task. [...] - http://en.wikipedia.org/wiki/Setuid
Sponsored Links
    #5  
Old 06-03-2010
jw_amp jw_amp is offline
Registered User
 
Join Date: Apr 2010
Last Activity: 3 August 2010, 2:41 AM EDT
Posts: 20
Thanks: 3
Thanked 1 Time in 1 Post
Quote:
Originally Posted by verdepollo View Post
Did you try?:


Code:
chmod u+s /path/to/your/application

After adding the setuid flag to your app you should be able to run the application with a standard user account.
I tried chmod u+s to my executable shell script .... but still not the app is running. But when I am doing "su" and later executing ... it works
Sponsored Links
    #6  
Old 06-03-2010
verdepollo's Avatar
verdepollo verdepollo is offline
Registered User
 
Join Date: Mar 2010
Last Activity: 3 September 2014, 11:17 AM EDT
Location: Mexico
Posts: 725
Thanks: 11
Thanked 106 Times in 102 Posts
What are the permissions of your file?

What's the message you are getting?
Sponsored Links
    #7  
Old 06-12-2010
majickmann's Avatar
majickmann majickmann is offline
Registered User
 
Join Date: Apr 2009
Last Activity: 25 August 2014, 4:43 PM EDT
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
There are so many things that could be wrong... Keeping in mind that there is very little information for anyone on this forum to work with.
If the application is for users, but requires root to execute, then it was poorly written. Not to be mean, it's just a fact.
Another possibility is the RPM was not built properly. Of course, root installs the RPM, but that doesn't mean the application/executables have to be owned by root.
If you're stuck with it, then install/configure "sudo". The application may run as expected, but I suspect there are issues with the application itself.
Some questions to ponder: Was the application developed to run as root? If not, why is root required now?
If it worked prior to the RPM build, what changed? Compare permissions/ownership...
Hope some of this helps...
:-)
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
kernel giving access for multiple users to access files jimmyuk UNIX for Dummies Questions & Answers 1 03-11-2010 12:28 PM
Giving existing user access on ftp Alexis Duarte Shell Programming and Scripting 0 07-23-2009 08:33 AM
giving write access to selective users to a certain directory in solaris 10 cromohawk Solaris 4 03-03-2009 03:32 AM
how to access root priveliges if root password is lost wojtyla Linux 1 02-18-2005 05:24 AM



All times are GMT -4. The time now is 11:46 PM.