LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   changing permissions and the UID... (https://www.linuxquestions.org/questions/solaris-opensolaris-20/changing-permissions-and-the-uid-156114/)

viper91681 03-10-2004 10:45 PM

changing permissions and the UID...
 
I am tying to make it so that the user has access to ping, since right now only root has access to that. How do you use chmod to change the UID? since I believe this is what needs to be set. Thanks in advance for any replies.

jtshaw 03-11-2004 12:13 AM

you probably want to do a chmod 755 ping. To actually change the uid (aka the owner of the file) you would use chown user:group file

viper91681 03-11-2004 09:14 AM

I've tried both "chmod 755 ping" and chown to make root the owner of the file, but I still can't get this to work. Any other suggestions? Thanks for the last one by the way.

FragInHell 03-11-2004 09:47 AM

Its nothing to do with the permissions on the file. They should be set with

-r-sr-xr-x root:bin ping

The problem is that ping is in the /usr/sbin directory. The sbin directory is not normally in normal users path. If you want to use ping you could either
1 add /usr/sbin to the users path either locally or system wide or
2 - copy the sbin binary into normal bin directory (/usr/bin)
3 - just use /usr/sbin/ping

The ping command runs as root (hence the UID set) but should have execute permissions for anyone. Changing the permissions on the file will lead to ping not having the correct permissions to run and probably will not work.
The binaries located in /usr/sbin (normally /sbin) are special because
1 they are there fore system recover (i.e single user mode)
2 They have all the special library functions contained in the binary so no external libraries are needed (which would normally be available in multi user mode (all the file systems mounted).


All times are GMT -5. The time now is 11:39 PM.