Project

General

Profile

Image directory mapping for a network drive and an independent web host.

Added by Jason van Rooyen over 14 years ago

Hi,

I am currently installing the following Leginon setup:

1 - windows: microscope pc
1 - linux: leginon processing box
1 - linux: web and database server
1 - linux: NFS server exporting a partition from the raid array to the web and processing hosts.

I am a bit confused as to how the images, which are saved onto the mounted network disk by the processing server, are accessed by the web server.

I apologize if I have missed this somewhere but can you help me identify where to set this up.

Regards,
Jason


Replies (4)

RE: Image directory mapping for a network drive and an independent web host. - Added by Anchi Cheng over 14 years ago

Hi, Jason,

The web server asks the database what the image path is and then use the exact path to access the file on the NFS server. I am not an expert in setting mount point but I believe that if the exact path syntax can be reached by the web server, the file reading would work.

However, I logged onto your leginonserver computer and had no problem accessing the path specified in your database. However, I see that the dirctories and files are not readable by anyone but the owner. This could be your problem since webserver access files as its own user so that outsiders can't read files through the web server without permission. You will have to find out how you want to deal with this. Because your webserver user will need read access to the image files. This is one of the reason that the webtools now have a login option in case the website is public but you don't want everyone to see your data.

Check Troubleshooting_Notes to see an example of giving the webserver user permission.

Anchi

RE: Image directory mapping for a network drive and an independent web host. - Added by Jason van Rooyen over 14 years ago

Hi Anchi,

So as I understand it the web server obtains the image path from the mysql database which in turn reads it from the leginon.cfg file on the processing machine.

I have, therefore, mounted the NFS disk on both the web host and the processing machine as /data. I have mapped the user's id's to an anonymous account on the NFS disk so anyone (root and all users) on the processing or web server machine has full read and write access to this volume.

Simulated images are written to this volume and I can see them from the web host as non-privileged user. I have tested this by editing the ex1.php file in the web site root to serve an image from the data directory e.g. http://mywebserver/ex1.php loads the simulated image collected on the processing box. However, the images themselves do not appear in imageviewer.php of myamiweb.

Do you think the same php syntax problem that caused problems with my test image viewer is to blame?

Regards,
Jason

RE: Image directory mapping for a network drive and an independent web host. - Added by Anchi Cheng over 14 years ago

Hi, Jason,

I poked around, and have it fixed. The real problem has nothing to do with the directory on a network drive. Your imageviewer of any real session shows the session name but no image is listed in the selection panel on the left. This means that the query for getting filenames failed.

The failure occurred because a missing table for fresh install before MSI applications are run. The bug was discovered two weeks ago by another user. It was fixed in the trunk and assigned to me to look it over and to merge to the branch. I just didn't get to do it. I've copied the change to your server and committed the merge to the branch as r14538. You might want to do an svn update on myamiweb in case of other bug fixes in the branch since your download.

Sorry about my slowness.

Anchi
    (1-4/4)