I have a system-wide sage install for all users.
The source lives in /usr/local/src and all of it is owned
by root.root. I chown it after install so that it does not
have another user's permissions. A user had this problem:
On Tue, Sep 01, 2009 at 02:41:54PM +0200, Dirk Laurie wrote:
> dirk@birlehlou:~/.sage$ sage -t dpl.sage
> init.sage does not exist ... creating
> Traceback (most recent call last):
> File "/usr/local/src/sage-4.1.1/local/bin/sage-test", line 49, in <module>
> os.makedirs(TMP)
> File "/usr/local/src/sage-4.1.1/local/lib/python/os.py", line 157, in makedirs
> mkdir(name, mode)
> OSError: [Errno 13] Permission denied: '/usr/local/src/sage-4.1.1/tmp/tmp'
> dirk@birlehlou:~/.sage$ sudo sage -t dpl.sage
> [sudo] password for dirk:
> Sorry, try again.
> [sudo] password for dirk:
> dirk is not in the sudoers file. This incident will be reported.
Is "sage -t" used for testing one's own code?
Should /usr/local/src/sage-4.1.1/tmp/tmp be world-writeable?
Is there then any control on the space used?
regards,
Jan
--
.~.
/V\ Jan Groenewald
/( )\ www.aims.ac.za
^^-^^
On Wed, Sep 02, 2009 at 11:24:25AM +1000, Minh Nguyen wrote:
> > Is there then any control on the space used?
If they did have write (unadvisable) they could fill the disk
space with logs.
On Tue, Sep 01, 2009 at 06:33:59PM -0700, William A. Stein wrote:
> Note that this should be considered a workaround. It should be
> considered a bug that users without write permissions to the Sage
> install directory can't test their scripts.
> It would be much better for Sage to use temp space in DOT_SAGE, i.e.,
> $HOME/.sage/temp by default.
Is there a ticket to fix this? .sage sounds good.
Quickly building a local sage is not even a workaround, it is not feasible.
I know the single user, so will change permissions on the directory in the
syste-wide install. It will only affect the local desktop, out of 127
desktops imaged from a central image.
Every time I image it will be overwritten. I can exclude it, but it is probably
better to clear it periodically. Is anything written there important to keep?
I posted a one-line patch to
http://trac.sagemath.org/sage_trac/ticket/6861. I don't have a
system-wide install to test it, though. Can someone test/review the
patch? I know almost nothing about the doctest system, so I don't know
if this breaks something crucial.
(Also, until this gets into the release, you might tell the user to set
the SAGE_TESTDIR environment variable before running sage -t)
Thanks,
Jason