On Thursday, November 7, 2013 10:16:45 AM UTC-7, Nils Bruin wrote:
>
>
> Your problem arises from the fact that sage's python is patched to be a 
> little more picky about  permissions on paths.
>

How come this only comes into play for doctesting and not for just running 
a script with sage? Using the example I posted before in the file 
example_script.py, I get

$ sage example_script.py
Here's your spam.
$ sage -t example_script.py 
Traceback (most recent call last):
...
RuntimeError: refusing to run doctests from the current directory 
'/DIR1/DIR2' since untrusted users could put files in this directory, 
making it unsafe to run Sage code from

 

> So I suspect your group-writable directory sits in a directory with a 
> different group ID (that would be the normal setup for, say, a group 
> writeable directory in /home). Your use case shows perhaps that this is not 
> such a great heuristic. On the other side, from a security point of view 
> it's better than nothing.
>
> I see several solutions:
>  - Change group ownership of the parent directory (that might need help 
> from your sysadmin and it's very likely he'd have good reasons to object)
>  - Nest everything one level deeper: make a directory INSIDE your 
> group-owned-and-writeable directory and put everything in there. I think 
> that might be enough to circumvent the newly-devised test.
>
 
I thought about that too. However, the path for example_script.py looks 
like /DIR1/DIR2/example_script.py, where DIR1 and DIR2 are both group 
writable and belong to the same group. However, they do have different 
owners, so I tried nesting the script deeper, so the path is 
/DIR1/DIR2/example_dir/example_dir2/example_script.py, where both 
example_dir and example_dir2 have the same owner and group and are group 
writable (but not world writable). The results were the same as before.

I also tried running it in a group writable directory in my home directory, 
which also failed. It seems to me that the documented behavior does not 
match the actual behavior.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to