Hi On Mon, 27 Jan 2020 at 20:57, John H Palmieri <jhpalmier...@gmail.com> wrote:
> > > 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. > Yes, though our students who start sage by clicking an icon, will never read the warning in the terminal. Would be nice if the warning showed in Jupyter as well. Or maybe keep fixing the permissions unless an enviroment variable is set, e..g SAGE_ALLOW_INSECURE_DOTSAGE. Regards, Jan -- .~. /V\ Jan Groenewald /( )\ www.aims.ac.za ^^-^^ -- 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/CAAg%3Dp_3KPwoF3UCG5B%3DFVr69xds3DCn3hLPA4urwN%2B%3D2uicxYA%40mail.gmail.com.