Windows 10: SageMath crashes on start with permission errors, but seems to work if I run "as administrator"

asked 2018-03-21 12:59:32 +0100

cretinsgaccount gravatar image

I think I have a workaround, at least, but thought I'd post this in case there's something I can fix or if someone else comes across the same problem, because I couldn't find any mention of these errors myself.

I'm using the Windows installer 0.3 for SageMath 8.1. It appears to install without issues but when I initially opened it I got this sequence of messages:

/etc/profile: line 111: cd: /home/user: Permission denied
WARNING: Failed attempt to cd into /home/user!
mkdir: cannot create directory ‘/home/user/.sagemath-8.1’: Permission denied
cp: cannot create directory '/home/user/.sagemath-8.1': Permission denied
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 8.1, Release Date: 2017-12-07                     │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                            │
└────────────────────────────────────────────────────────────────────┘
mkdir: cannot create directory ‘/dot_sage’: Permission denied
/opt/sagemath-8.1/local/lib/python2.7/site-packages/IPython/paths.py:69: UserWarning: IPython parent '/dot_sage' is not a writable location, using a temp directory.
  " using a temp directory.".format(parent))

It goes on to say Sage crashed, and asks me to email in the crash report. When I tried opening the shell or Notebook I got similar errors.

Then while groping for something to try I right-clicked and ran "as an administrator" and everything appears to resolve.

I'm not the most savvy at high-level IT stuff but I thought this was strange, as I haven't had to use that feature with anything else I've installed, and there's no shortage of crap I've installed. There's only one account on my computer, there shouldn't be administrator permission issues.

edit retag flag offensive close merge delete

Comments

It's difficult exactly to help with something like this without being on the very machine where the problem is. But it sounds likely that there are some permission problems on your home directory; e.g. C:\Users\<Your Username>. I'm unsure though because if that were the case I'd think you'd have other problems. If you go to that directory in Windows explorer and right click on it and select "Properties" from the menu you should be able to get to the "Security" tab and check the permissions on the directory...

Iguananaut gravatar imageIguananaut ( 2018-03-21 14:08:47 +0100 )edit

This is a linux machine answering... Which is exactly the location /home/user on the Windows box running sage and which are the rights for it?! Is it possible to start in the command line (after Win+R and cmd) the "sage shell" via sage -sh and then check via set SAGE the settings for the sage specific environment variables?

dan_fulea gravatar imagedan_fulea ( 2018-03-21 18:58:30 +0100 )edit

@dan_fulea are you sure you're commenting on the correct question? With apologies, your comment doesn't make much sense to me (to be clear, I'm the creator an present maintainer of the Windows release of Sage so I'm not completely reaching around in the dark here). The problem is definitely that the Windows permissions on the user's directories are messed up somehow.

Iguananaut gravatar imageIguananaut ( 2018-03-27 11:06:29 +0100 )edit

Sorry, this was an answer without specific knowledge of the situation, i also have no Win* operating system on the many laptops. Starting from the message

/etc/profile: line 111: cd: /home/user: Permission denied
WARNING: Failed attempt to cd into /home/user!

i assumed that a linux emulation exists in the windows "run sage" call, which was producing the error. On my machine, i would find and edit /etc/profile and give a print of the environment variables, and of the /home/user value. (Possibly Windows performed a system-wide install, and a specific user has no rights to access the systemwide home...)

I'm afraid there is no SAGE_HOME or SAGE_ROOT or ... and/or no sage shell in the windows install, sorry for this misleading point!

dan_fulea gravatar imagedan_fulea ( 2018-03-28 00:27:02 +0100 )edit

That fact that it works when they "Run as administrator" means the Windows permissions are corrupt on the user's home directory.

Iguananaut gravatar imageIguananaut ( 2018-04-11 16:25:59 +0100 )edit