Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
05-10-2008, 03:15 AM
#1
Member
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259
Rep:
Unable to start lighttpd as sudo on solaris 9
Hi
I have Lighttpd-1.4.11 on Solaris 9 box. While I am using sudo to start that application I am getting following error
/apps/lighttpd-1.4.11/lighttpd -f /apps/lighttpd-1.4.11/lighttpd.conf
ld.so.1: lighttpd: fatal: libssl.so.0.9.8: open failed: No such file or directory
Killed
In the same case while doing sudo - su I am able to execute the command
/apps/lighttpd-1.4.11/lighttpd -f /apps/lighttpd-1.4.11/lighttpd.conf
without any problem.
In the same ref I have done the below mentioned things
1.Copied .cshrc of root to my uesr
2.Checked the permission & ownership of /usr/local/ssl/lib/libssl.so.0.9.8 which root:bin r-xr-xr-x
As I want to execute the same as sudo only
Please suggest
Thanks
Rajan
05-10-2008, 03:54 AM
#2
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
That means /apps/lighttpd-1.4.11/lighttpd is either not properly built or not installed in the correct directory. It should reference /usr/local/ssl/lib/libssl.so.0.9.8.
What says:
Code:
su root sh -c ldd /apps/lighttpd-1.4.11/lighttpd
?
05-10-2008, 04:03 AM
#3
Member
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259
Original Poster
Rep:
Reply
Hi Jlliagre
It give
libdl.so.1 => /usr/lib/libdl.so.1
libsendfile.so.1 => /usr/lib/libsendfile.so.1
libssl.so.0.9.8 => /usr/local/ssl/lib/libssl.so.0.9.8
libcrypto.so.0.9.8 => /usr/local/ssl/lib/libcrypto.so.0.9.8
libresolv.so.2 => /usr/lib/libresolv.so.2
libnsl.so.1 => /usr/lib/libnsl.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libc.so.1 => /usr/lib/libc.so.1
libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1
libmp.so.2 => /usr/lib/libmp.so.2
/usr/platform/SUNW,Sun-Fire-V440/lib/libc_psr.so.1
Thanks
Rajan
05-10-2008, 04:06 AM
#4
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Is your LD_LIBRARY_PATH environment variable set ?
05-10-2008, 04:24 AM
#5
Member
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259
Original Poster
Rep:
Reply
Hi Jlliagre
Yes the path is set properly.
setenv LD_LIBRARY_PATH /usr/lib:/usr/local/lib:/usr/local/ssl/lib
I got one more observation
1 Whlie login as root/[myuser] I am getting same output for
ldd /apps/lighttpd-1.4.11/lighttpd
libdl.so.1 => /usr/lib/libdl.so.1
libsendfile.so.1 => /usr/lib/libsendfile.so.1
libssl.so.0.9.8 => /usr/local/ssl/lib/libssl.so.0.9.8
libcrypto.so.0.9.8 => /usr/local/ssl/lib/libcrypto.so.0.9.8
libresolv.so.2 => /usr/lib/libresolv.so.2
libnsl.so.1 => /usr/lib/libnsl.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libc.so.1 => /usr/lib/libc.so.1
libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1
libmp.so.2 => /usr/lib/libmp.so.2
/usr/platform/SUNW,Sun-Fire-V440/lib/libc_psr.so.1
2 While login as my user and using sudo I am getting the output
sudo ldd /apps/lighttpd-1.4.11/lighttpd
libdl.so.1 => /usr/lib/libdl.so.1
libsendfile.so.1 => /usr/lib/libsendfile.so.1
libssl.so.0.9.8 => (file not found)
libcrypto.so.0.9.8 => (file not found)
libresolv.so.2 => /usr/lib/libresolv.so.2
libnsl.so.1 => /usr/lib/libnsl.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libc.so.1 => /usr/lib/libc.so.1
libmp.so.2 => /usr/lib/libmp.so.2
/usr/platform/SUNW,Sun-Fire-V440/lib/libc_psr.so.1
Now I feel that you can easily figure out the issue.
Also note that while login as [myuser] while executing the command
it gives me
/apps/lighttpd-1.4.11/lighttpd -f /apps/lighttpd-1.4.11/lighttpd.conf
2008-05-10 02:14:42: (network.c.300) can't bind to port: 206.16.219.164 80 Permission denied
That's why I am using sudo.
Please suggest
05-10-2008, 04:45 AM
#6
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Quote:
Originally Posted by
rajaniyer123
Yes the path is set properly.
setenv LD_LIBRARY_PATH /usr/lib:/usr/local/lib:/usr/local/ssl/lib
This is the problem. Lighttpd isn't properly compiled. You shouldn't have to set the LD_LIBRARY_PATH.
One way to workaround that would be to create a wrapper script, eg /apps/lighttpd-1.4.11/lighttpd.ksh:
Code:
#!/bin/ksh
export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/usr/local/ssl/lib
exec /apps/lighttpd-1.4.11/lighttpd "$@"
Quote:
Also note that while login as [myuser] while executing the command
it gives me
/apps/lighttpd-1.4.11/lighttpd -f /apps/lighttpd-1.4.11/lighttpd.conf
2008-05-10 02:14:42: (network.c.300) can't bind to port: 206.16.219.164 80 Permission denied
If the only reason is that one, Solaris provides a simpler an much more secure solution than sudo for it.
Code:
usermod -K defaultpriv=basic,net_privaddr myuser
With myuser being the non root user account used to launch the server, ie. your account in that case.
You need to logout/login for the change to be effective.
Last edited by jlliagre; 05-11-2008 at 02:09 AM .
05-11-2008, 12:58 AM
#7
Member
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259
Original Poster
Rep:
Reply
Hi Jlliagre
I am really thankful for your help.
I have copied the lib file to /usr/lib, and then my issue has been reoslved.
Thanks
Rajan
05-11-2008, 02:09 AM
#8
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Copying a non OS library to /usr/lib is unsupported but is indeed a workaround. Too bad you didn't implement the superior RBAC solution ...
All times are GMT -5. The time now is 09:20 AM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News