Hi,

your “chroot location” is defined in /etc/lighttpd.conf.  If you didn't change 
it, it is /var/www.

Please read the man page for chroot(8).  The command to do this is “man 8 
chroot” (without the quotes).  Alternatively the Wikipedia entry for chroot can 
help you understand what chroot is and does.

Stuart's answers assume you didn't change the file /etc/lighttpd.conf.  If you 
did change it, you might want to send the contents of the changed file, too.

Best regards,
Robert


On Tue, 20 Aug 2024 12:33:57 -0400
David Colburn <q...@kd4e.com> wrote:

> So, I'm at a dead end atm.
> 
> It was a clean install - OpenBSD 7.5, php 8.3.10, lighttpd-1.4.74-mysql
> 
> What should have worked (Stuart's instructions) didn't.
> 
> 'chroot' locations are as listed (see following).
> 
> Where do I go from here, please?
> 
> Is it possible that the lighttpd.conf from lighttpd-1.4.74-mysql 
> contains errors?
> 
> Or, that I should have used a different version of lighttpd?
> 
> Or ...
> 
> Thanks.
> 
> 
> b7# locate chroot
> 
> /usr/local/share/doc/pkg-readmes/femail-chroot
> 
> /usr/sbin/chroot
> 
> /usr/share/man/man2/chroot.2
> 
> /usr/share/man/man8/chroot.8
> 
> /var/db/pkg/femail-chroot-1.0p3
> 
> /var/db/pkg/femail-chroot-1.0p3/+CONTENTS
> 
> /var/db/pkg/femail-chroot-1.0p3/+DESC
> 
> /var/db/pkg/femail-chroot-1.0p3/+REQUIRED_BY
> 
> /var/db/pkg/femail-chroot-1.0p3/REQUIRING
> 
> On 8/18/24 20:30, Stuart Henderson wrote:
> > Hmm. That should be ok...
> >
> > -- 
> >   Sent from a phone, apologies for poor formatting.
> >
> >
> > On 18 August 2024 21:19:25 David Colburn <q...@kd4e.com> wrote:
> >  
> >> total 0
> >>
> >> crw-rw-rw- 1 root  wheel  2, 2 Aug 18 10:07 null
> >>
> >>
> >> On 8/18/24 16:00, Stuart Henderson wrote:  
> >>> Did you do the mkdir etc? What does ls -l /var/www/dev show?
> >>>
> >>> -- 
> >>>   Sent from a phone, apologies for poor formatting.
> >>>
> >>>
> >>> On 18 August 2024 17:01:52 David Colburn <q...@kd4e.com> wrote:
> >>>  
> >>>> I removed "nodev" from the /var line and rebooted.
> >>>>
> >>>> Same error:
> >>>>
> >>>> 2024-08-13 22:29:37:
> >>>> (/usr/obj/ports/lighttpd-1.4.74-mysql/lighttpd-1.4.74/src/configfile.c.1891)
> >>>>  
> >>>>
> >>>> opening /dev/null failed. No such file or directory.
> >>>> 2024-08-13 22:29:37:
> >>>> (/usr/obj/ports/lighttpd-1.4.74-mysql/lighttpd-1.4.74/src/server.c.1935) 
> >>>>
> >>>> Opening errorlog failed.
> >>>>
> >>>>
> >>>> On 8/18/24 11:19, David Colburn wrote:  
> >>>>> /etc/fstab currently looks like this:
> >>>>>
> >>>>> none swap sw
> >>>>> / ffs rw 1 1
> >>>>> /home ffs rw,nodev,nosuid 1 2
> >>>>> /tmp ffs rw,nodev,nosuid 1 2
> >>>>> /usr ffs rw,nodev 1 2
> >>>>> /usr/X11R6 ffs rw,nodev 1 2
> >>>>> /usr/local ffs rw,wxallowed,nodev 1 2
> >>>>> /usr/obj ffs rw,nodev,nosuid 1 2
> >>>>> /usr/src ffs rw,nodev,nosuid 1 2
> >>>>> /var ffs rw,nodev,nosuid 1 2
> >>>>>
> >>>>>
> >>>>> On 8/18/24 10:28, David Colburn wrote:  
> >>>>>> That's very helpful, thanks!
> >>>>>>
> >>>>>> /var is mounted "ffs rw,nodev,nosuid, 1 2"
> >>>>>>
> >>>>>> /var/www isn't specifically mentioned.
> >>>>>>
> >>>>>> Would it be affected by the /var mount settings?
> >>>>>>
> >>>>>> Thanks again.
> >>>>>>
> >>>>>> On 8/18/24 07:50, Stuart Henderson wrote:  
> >>>>>>> On 2024-08-15, David Colburn <q...@kd4e.com> wrote:  
> >>>>>>>> This is a multi-part message in MIME format.
> >>>>>>>> --------------SIjdwSa43FawypA6wB8kzt18
> >>>>>>>> Content-Type: text/plain; charset=UTF-8; format=flowed
> >>>>>>>> Content-Transfer-Encoding: 7bit
> >>>>>>>>
> >>>>>>>> Dell OptiPlex 7050
> >>>>>>>>
> >>>>>>>> OpenBSD 7.5
> >>>>>>>>
> >>>>>>>> php 8.3.10
> >>>>>>>>
> >>>>>>>> lighttpd-1.4.74-mysql
> >>>>>>>>
> >>>>>>>> I'm using root.
> >>>>>>>>
> >>>>>>>> "*rcctl -df start lighttpd*" errors
> >>>>>>>>
> >>>>>>>> "/daemonized server failed to start; check error log for 
> >>>>>>>> details doing
> >>>>>>>> _rc_rm_runfile (failed)/"
> >>>>>>>>
> >>>>>>>> error.log says:
> >>>>>>>>
> >>>>>>>> "...
> >>>>>>>> (/usr/obj/ports/lighttpd-1.4.74-mysql/lighttpd-1.4.74/src/configfile.c.1981)
> >>>>>>>>  
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> opening /dev/null failed: No such file or directory"
> >>>>>>>>
> >>>>>>>> "...
> >>>>>>>> (/usr/obj/ports/lighttpd-1.4.74-mysql/lighttpd-1.4.74/src/configfile.c.1935)
> >>>>>>>>  
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> Opening errorlog failed: No such file or directory"
> >>>>>>>>
> >>>>>>>> According to this:
> >>>>>>>>
> >>>>>>>> https://www.reddit.com/r/openbsd/comments/nygjdm/lighttpd_cant_find_devnull_on_69/
> >>>>>>>>  
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> there's supposed to be a directory here: /usr/sbin/chroot/ but
> >>>>>>>> chroot is
> >>>>>>>> actually a file.
> >>>>>>>>
> >>>>>>>> I'm not sure how to proceed to fix the dev/null problem ...  
> >>>>>>> Assuming /var/www/dev does not already exist, this should do it:
> >>>>>>>
> >>>>>>> # mkdir /var/www/dev
> >>>>>>> # cd /var/www/dev
> >>>>>>> # sh /dev/MAKEDEV std
> >>>>>>> # rm !(null)
> >>>>>>>
> >>>>>>> If it already exists then you may need to adapt the rm command to
> >>>>>>> preserve existing entries, or use mknod(8) manually to just create
> >>>>>>> the "null" node.
> >>>>>>>
> >>>>>>> You'll also need to make sure that /var/www is _not_ mounted with
> >>>>>>> the "nodev" option (/etc/fstab).
> >>>>>>>
> >>>>>>> If this is a hard requirement for lighttpd then the port could
> >>>>>>> probably do with explaining it somewhere .. (maintainer cc'd)  
> >>>  
> >  

Reply via email to