Notebook server should run Java for JMol inside temporary directory
|Reported by:||ppurka||Owned by:||jason, mpatel, was|
|Cc:||gutow, dimpase||Merged in:|
|Authors:||Jeroen Demeyer||Reviewers:||Punarbasu Purkayastha|
|Report Upstream:||N/A||Work issues:|
Description (last modified by jdemeyer)
When a Sage notebook server needs to create a static 3D image, it runs JMol server-side to create this image (if Java is available). However, it does this inside a directory to which the worker process might not have access to.
Old report (before we diagnosed the problem):
We have been running the sage worksheets as an unprivileged user. The setup is as follows.
- A user, say user1, starts the sage server using
sage -n port=8888 accounts=True interface='' server_pool=['sagenb@localhost'] openid=True automatic_login=False port_tries=0 directory=/home/user1/a.sagenb
- Because of the server_pool command, any worksheet is opened as an unprivileged user called sagenb. Here is some more info on how to set up the environment.
- Create user sagenb by doing (as root)
$ groupadd sagenb $ useradd -g sagenb -m sagenb
- Create a ssh key for user1
$ ssh-keygen -t rsa # run as user1 and make it passwordless
- Copy the id_rsa.pub to ~sagenb/.ssh/authorized_keys.
$ cp -a ~user1/.ssh/id_rsa.pub /tmp/authorized_keys # Run as user1 $ mkdir ~sagenb/.ssh # Run as sagenb $ cp /tmp/authorized_keys .ssh # Run as sagenb
- Create user sagenb by doing (as root)
- With default sage-5.2 there is no problem with this and everything works.
- With sage-5.2 + "#13121 without new jmol", jmol works but one needs to close the worksheet and then reopen the worksheet and then the jmol pops up.
- With sage-5.2 + #13121, jmol works partially:
- First, the static image can not be created and there is a permission denied error. See permission_error.jpg.
- However, once the 3D output is toggled, jmol loads fine. The permission denied error is still there.
- The error obtained is of the form
script ERROR: script ERROR: io error reading /home/user1/a.sagenb/home/__store__/0/09/098/098f/te\ st/0/cells/7/sage0-size500-499889951.jmol.zip|SCRIPT: java.io.FileNotFoundException: /home/user1/a.sagenb/home/__store__/0/09/098/098f/te\ st/0/cells/7/sage0-size500-499889951.jmol.zip (Permission denied) Sleeping...Make Interactive
- When run locally, i.e., without server_pool, the jmol loads and runs fine. For instance, this is fine:
sage -n directory=a.sagenb
This problem has made it difficult for me to upgrade a server from 5.2 and I think the error is introduced by some change in jmol. The error itself stems from some java component. A diff of the changes between the directory $SAGE_ROOT/devel/sagenb/sagenb/data/sage3d for sage-5.2 and sage-5.7.rc0 has not yielded any difference. So, I believe the difference is really in the jmol spkg introduced in #12299.
I have traced it back and reproduced it in sage-5.2 + new notebook + new jmol. Although I wrote sage-5.2 above, the error is present in all the sage versions I have tried - sage-5.4 till sage-5.9.beta0.
Change History (48)
Changed 2 years ago by ppurka
comment:9 in reply to: ↑ 6 Changed 20 months ago by ppurka
comment:13 Changed 17 months ago by jdemeyer
comment:17 in reply to: ↑ 15 Changed 17 months ago by jdemeyer
comment:18 Changed 17 months ago by jdemeyer
comment:19 follow-up: ↓ 20 Changed 17 months ago by ppurka
comment:20 in reply to: ↑ 19 ; follow-up: ↓ 22 Changed 17 months ago by jdemeyer
comment:24 in reply to: ↑ 22 Changed 17 months ago by jdemeyer
Changed 17 months ago by ppurka
comment:29 Changed 17 months ago by jdemeyer
comment:30 Changed 17 months ago by jdemeyer
- Component changed from notebook to graphics
- Description modified (diff)
- Summary changed from Permission denied error with jmol and "remote" user to Notebook server should run Java for JMol inside temporary directory
Changed 17 months ago by jdemeyer
comment:36 in reply to: ↑ 34 Changed 17 months ago by jdemeyer
comment:40 in reply to: ↑ 39 Changed 17 months ago by ppurka
- Reviewers set to Punarbasu Purkayastha
- Status changed from needs_review to positive_review
comment:44 Changed 16 months ago by vbraun
- Resolution set to fixed
- Status changed from positive_review to closed