William Stein пишет: > On Mon, Aug 3, 2009 at 9:26 AM, Serge A. Salamanka<salsa-...@tut.by> wrote: >> Dear support, >> >> I'm having a bit of a problem with setting up Sage public server with >> several pool accounts. >> >> Everything is done according to recommendations on >> http://wiki.sagemath.org/DanDrake/JustEnoughSageServer >> except that I have to set up 750 permission for the group of sageusers >> on /home/sageadm (chmod 750 /home/sageadm ) >> Otherwise the notebook cells show error "Permission denied" >> >> So I have created dir /home/sageadm/sagenbfiles for notebook server and >> setup 2775 permission. >> >> The server is run by the user sageadm with pool accounts of several >> others with no password by ssh. >> >> I can sign up on the server and the interface but I can't execute simple >> code "2-1" or anything other in the notebook cell. >> It says: >> " Traceback (most recent call last): 2-1 >> NameError: name 'os' is not defined >> There was an error loading the sage libraries. Try starting from the >> command line to see what the error is." > > Can you manually ssh to the pool accounts and type "sage" to run Sage? > The pool accounts *must* be able to run Sage by just typing "sage". > > William >
I can ssh to pool accounts and run sage with no problem. Still no result: Traceback (most recent call last): 2-1 NameError: name 'os' is not defined THERE WAS AN ERROR LOADING THE SAGE LIBRARIES. Try starting Sage from the command line to see what the error is. ############################# I tried to evaluate .py file from the command line under pool account: [sage...@sagenb ~]$ cat /home/sageadm/sagenbfiles/worksheets/salsa/1/code/8.py # -*- coding: utf_8 -*- from __future__ import with_statement print "b12" os.chdir("/home/sageadm/sagenbfiles/worksheets/salsa/1/cells/11") sage.server.notebook.interact.SAGE_CELL_ID=11 print _support_.syseval(sh, ur'''ls''', '/home/sageadm/sagenbfiles/worksheets/salsa/1/cells/11') print "e12" [sage...@sagenb ~]$ [sage...@sagenb ~]$ sage -python /home/sageadm/sagenbfiles/worksheets/salsa/1/code/8.py b12 Traceback (most recent call last): File "/home/sageadm/sagenbfiles/worksheets/salsa/1/code/8.py", line 4, in <module> os.chdir("/home/sageadm/sagenbfiles/worksheets/salsa/1/cells/11") NameError: name 'os' is not defined [sage...@sagenb ~]$ [sage...@sagenb ~]$ #these are env. vars (some of them most important): [sage...@sagenb ~]$ env HOSTNAME=sagenb.sageworldmath.org SHELL=/bin/bash USER=sagenb1 PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/sagenb1/bin PWD=/home/sagenb1 HOME=/home/sagenb1 LOGNAME=sagenb1 [sage...@sagenb ~]$ [sage...@sagenb ~]$ #not sure but seems to be the wrong way. group should have write permission: [sage...@sagenb ~]$ ll /home/sageadm/sagenbfiles/worksheets/salsa/1/code/8.py -rw-r--r-- 1 sageadm sageusers 298 Aug 4 12:16 /home/sageadm/sagenbfiles/worksheets/salsa/1/code/8.py [sage...@sagenb ~]$ Something might have changed since Dan Drake wrote his notes on the server set up: http://wiki.sagemath.org/DanDrake/JustEnoughSageServer I'm sorry to bother with such problems. Just give your ideas here. # Serge >> well, you can check out yourself at >> https://sagenb.sageworldmath.org:8000/ >> >> The point is when I run server with default dir in .sage and no pool >> accounts, it works good. >> But when I point to the dir outside of the /home/sageadm/.sage it shows >> error. >> >> Any ideas ? >> >> I use Sage-4.1 (latest download) and Scientific Linux 5.3 >> >> # Serge >> > > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---