psxndc
January 5th, 2004, 20:36
I've tried getting gallery running under OpenBSD. During the config/setup it refuses to recognize that I have ImageMagick and NetBPM installed. I even built IM from source so that I had the current version. My guess, without any real investigation, is that this has to do with OpenBSD's chroot'ed Apache not being able to see outside the /var/www directory. Anyone else run into/fix this problem? Thanks in advance.

-p

bsdjunkie
January 5th, 2004, 20:41
Ive never used it b4, but if you are running chrooted, that could definately give you issues like you think.

|MiNi0n|
January 5th, 2004, 21:59
KrUsTy! has it running in Open... though I don't think it's chrooted.

KrUsTy!
January 6th, 2004, 01:55
psxndc, you pretty much answered your own question, the binaries have to be inside the chrooted area for apache, which is /var/www in OpenBSD.

I am running gallery on OpenBSD. I spent a short time trying to chroot it, and gave up. Certainly if you are trying to run gallery chrooted, the IM and NetPBM binaries have to be inside the chrooted enviroment, as the apache will not use any paths other then in the chrooted enviroment.

When I attempted to chroot those binaries, they gave errors and problems. I didn't spend a great deal of time on it however, as I was running another package that was also not easily chrooted as well, and so I gave up and just ran apache un-chrooted, which is what I am doing on my gallery server now. Kind of a cop-out, but I just wanted it working. Maybe soon I'll spend some time getting it properly chrooted. For just my pictures, it wasn't worth my effort I figured.

You should test it while apache is un-chrooted, and see if it works and sees IM and NetPBM, and that will give you your answer if it's the chroot causing your problem.

To run apache not chrooted in OpenBSD, in /etc/rc.conf;

httpd_flags="-u"

or just start apache manually with "httpd -u". Using the "apachectl start" command in OpenBSD will kick up apache chrooted.

I'm sure that spending some time going through all the binaries that gallery calls and putting them inside the chrooted area, you could get it to work. I was just lazy..... :oops:

{K}

elmore
January 6th, 2004, 02:51
I am running gallery on OpenBSD. I spent a short time trying to chroot it, and gave up. Certainly if you are trying to run gallery chrooted, the IM and NetPBM binaries have to be inside the chrooted enviroment, as the apache will not use any paths other then in the chrooted enviroment.

When I attempted to chroot those binaries, they gave errors and problems. I didn't spend a great deal of time on it however, as I was running another package that was also not easily chrooted as well, and so I gave up and just ran apache un-chrooted, which is what I am doing on my gallery server now. Kind of a cop-out, but I just wanted it working. Maybe soon I'll spend some time getting it properly chrooted. For just my pictures, it wasn't worth my effort I figured.


If you downloaded the linux binaries off of the gallery website you'd then need to build the linux emulator into the chroot. You could build them natively I suppose and statically so that there are no linked libs. You could do a 'ldd NetPBM' to see what libs it needs.

KrUsTy!
January 6th, 2004, 03:59
If you downloaded the linux binaries off of the gallery website you'd then need to build the linux emulator into the chroot. You could build them natively I suppose and statically so that there are no linked libs. You could do a 'ldd NetPBM' to see what libs it needs.

Both ImageMagick and NetPBM are in the OpenBSD ports. In fact everything that is needed for gallery is in the ports. Certainly it would be best to have everything built natively for OpenBSD to run so you wouldn't have to deal with any emulation. I spent almost no time working on why my first attempt to get it to work while in chroot didn't work. I just took the lazy way out and un-chrooted. I'll bet that my problem had something to do with the linked libs as elmore suggested. That could be a usefull hint in getting gallery chrooted properly with natively built ImageMagick and NetPBM from the ports.

Deffinately something for me to keep in mind the next time I try it, which now that I have been thinking about it again might be pretty soon! :lol:

{K}

elmore
January 6th, 2004, 09:39
Both ImageMagick and NetPBM are in the OpenBSD ports.


Shows you when the last time I ran gallery was. Cause they weren't in the ports tree the last time I used it. of course that was prolly 2.9 or maybe 3.0 anyways needless to say a while ago. ;)

psxndc
February 13th, 2004, 00:54
Sorry I was afk for so long. :) Thanks for the input. I may unjail it, but not anytime soon mainly due to lack of free time. I appreciate all the help and suggestions. Esp. Krusty's "start unjailed, fix the problem, then try jailing it to see where the problems are."

-p

bsdjunkie
February 13th, 2004, 10:21
BTW, I remember seeing a security hole for gallery float across one of the lists. You may want to upgrade :roll: