LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
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


Reply
  Search this Thread
Old 05-10-2008, 03:15 AM   #1
rajaniyer123
Member
 
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259

Rep: Reputation: 30
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
 
Old 05-10-2008, 03:54 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
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
?
 
Old 05-10-2008, 04:03 AM   #3
rajaniyer123
Member
 
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259

Original Poster
Rep: Reputation: 30
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
 
Old 05-10-2008, 04:06 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Is your LD_LIBRARY_PATH environment variable set ?
 
Old 05-10-2008, 04:24 AM   #5
rajaniyer123
Member
 
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259

Original Poster
Rep: Reputation: 30
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
 
Old 05-10-2008, 04:45 AM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
Originally Posted by rajaniyer123 View Post
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.
 
Old 05-11-2008, 12:58 AM   #7
rajaniyer123
Member
 
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259

Original Poster
Rep: Reputation: 30
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
 
Old 05-11-2008, 02:09 AM   #8
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
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 ...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sudo help on Solaris 8 nuganen Solaris / OpenSolaris 2 04-03-2008 04:10 PM
xfmedia won't start without sudo cdom Linux - Software 0 09-29-2007 12:14 PM
cant start X apps using su or sudo slinky2004 Linux - Newbie 3 11-30-2005 08:14 PM
Long Shot Question - Solaris 9 / Sudo / TSM Server. FragInHell Solaris / OpenSolaris 2 11-25-2004 08:05 AM
sudo: unable to lookup via gethostbyname() rickenbacherus Linux - General 2 12-07-2003 03:09 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 09:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration