maximilianh / cellBrowser

main repo: https://github.com/ucscGenomeBrowser/cellBrowser/ - Python pipeline and Javascript scatter plot library for single-cell datasets, http://cellbrowser.rtfd.org
https://github.com/ucscGenomeBrowser/cellBrowser/
GNU General Public License v3.0
104 stars 40 forks source link

permissions issue when building into webserver directory #51

Closed daskelly closed 5 years ago

daskelly commented 5 years ago

Hi, thank you for building and releasing this really beautiful browser. I am attempting to build a cell browser served by Apache on a machine running CentOS 7.5. Running a demo browser using your example data works just fine:

curl -s https://cells.ucsc.edu/downloads/samples/mini.tgz | tar xvz
cd mini
cbBuild -o ~/public_html/cells/ -p 8888
# cellBrowser is viewable at ip_address:8888

However, when I try to build to the webserver's webdirectory (still working with the example data), I run into a problem. It looks like a permissions problem although I am running as sudo. Here is the message I see:

-bash-4.2$ sudo cbBuild -o /var/www/
Enter your Domain password:
INFO:root:/home/skelld/mini/summary.html does not exist
INFO:root:/home/skelld/mini/methods.html does not exist
INFO:root:/home/skelld/mini/downloads.html does not exist
INFO:root:/home/skelld/mini/thumb.png does not exist
INFO:root:Getting md5 of /home/skelld/mini/meta.tsv
md5sum: /home/skelld/mini/meta.tsv: Permission denied
Traceback (most recent call last):
  File "/bin/cbBuild", line 11, in <module>
    sys.exit(cbBuildCli())
  File "/usr/lib/python2.7/site-packages/cellbrowser/cellbrowser.py", line 2578, in cbBuildCli
    cbBuild(confFnames, outDir, port)
  File "/usr/lib/python2.7/site-packages/cellbrowser/cellbrowser.py", line 2545, in cbBuild
    convertDataset(inConf, outConf, datasetDir)
  File "/usr/lib/python2.7/site-packages/cellbrowser/cellbrowser.py", line 2296, in convertDataset
    sampleNames, needFilterMatrix, outMeta = convertMeta(inConf, outConf, datasetDir)
  File "/usr/lib/python2.7/site-packages/cellbrowser/cellbrowser.py", line 2123, in convertMeta
    outConf["fileVersions"]["inMeta"] = getFileVersion(metaFname)
  File "/usr/lib/python2.7/site-packages/cellbrowser/cellbrowser.py", line 2109, in getFileVersion
    hexHash = md5ForFile(fname)
  File "/usr/lib/python2.7/site-packages/cellbrowser/cellbrowser.py", line 2211, in md5ForFile
    md5 = getMd5Using("md5sum", fname).split()[0]
  File "/usr/lib/python2.7/site-packages/cellbrowser/cellbrowser.py", line 2204, in getMd5Using
    assert(err==0)
AssertionError

Any idea whether I am doing something wrong? Or could this be a bug in cellBrowser? Thanks!

maximilianh commented 5 years ago

I don't think you're doing something wrong, but something is clearly wrong. :-) I checked the .tgz file, the permissions seems to be fine there.

Can you send me the output of "ls -la /home/skelld/mini/meta.tsv" ? I hope it's --- or something similar, easy to fix.

Could you also run cbBuild with the -d option? This will give us some idea why this (pretty basic) command is failing...

thanks!

maximilianh commented 5 years ago

Actually, nevermind, we know what the Unix command was that the script tried to run. It ran:

md5sum /home/skelld/mini/meta.tsv

and apparently that failed. I imagine this really has to be some sort of permission problem?

daskelly commented 5 years ago

Thanks, your confirmation of this helped a lot. I am trying to run on a VM and running into issues with root squash due to NFS mount. Thus you are correct that this is a permissions problem on my end, not something on cellBrowser's end. Thanks!

maximilianh commented 5 years ago

Great to know thanks! Let me know if you run into any other problem. I'd be more than happy to host your dataset on cells.ucsc.edu, it may be a more stable location than your own webserver. Also, let me know if you're interested in other features (cell search, naming of cells, interactive meta data changes...)