On Monday, January 27, 2020 at 9:59:04 AM UTC-8, Matthias Koeppe wrote:
>
> On Monday, January 27, 2020 at 9:34:41 AM UTC-5, Marc Mezzarobba wrote:
>>
>>
>> I just noticed that Sage unconditionally changes the permissions of the 
>> DOT_SAGE directory to rwx--- even after the user manually modified them 
>> (sage/misc/misc.py, l. 92ff). It seems to me however that there are 
>> perfectly valid reasons to share one's .sage with other users. Worse, 
>> Sage crashes if the attempt to set the permissions fails (try chattr +i 
>> ~/.sage). 
>
>   
> In my opinion, it should set these permissions when it creates the 
> DOT_SAGE directory
> for the first time (similar to how permissions of files like 
> ~/.python_history or ~/.bash_history are set), but not adjust them if the 
> directory already exists. It would be appropriate to write out a warning 
> though if they are more permissive than rwx------.
>
> Matthias
>

As noted in the cited part of misc.py, people might also have concerns 
about their Sage command history. I like the warning idea. It would make 
more sense to me to have a function which checks whether DOT_SAGE exists, 
creates it and sets permissions if it doesn't, checks permissions and 
prints a warning if it exists with bad permissions, is silent otherwise. 
Then run this function when Sage starts up. That seems better than having 
code executed at the top-level of misc.py.

-- 
John

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/4548dbb2-4f86-444f-9047-c56bdaadf9b4%40googlegroups.com.

Reply via email to