Ask Your Question
0

/sage: line 334: path/sage-ipython: Permission denied

asked 2015-03-19 23:32:14 +0100

alejandroerickson gravatar image

I get an error like this one when I try to start sage.

/sage: line 334: path/sage-ipython: Permission denied

It does start (with related errors), however, when I run

$ sudo sage

I might need help providing the right details, but here goes:

    usrname$ sage
┌────────────────────────────────────────────────────────────────────┐
│ Sage Version 6.5, Release Date: 2015-02-17                         │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                            │
└────────────────────────────────────────────────────────────────────┘
/Users/usrname/sage/src/bin/sage: line 334: /Users/usrname/sage/src/bin/sage-ipython: Permission denied
/Users/usrname/sage/src/bin/sage: line 334: exec: /Users/usrname/sage/src/bin/sage-ipython: cannot execute: Undefined error: 0

I get a different error using sudo.

usrname:~ usrname$ sudo sage
sys:1: RuntimeWarning: not adding directory '' to sys.path since it's not owned by a trusted user.
Untrusted users could put files in this directory which might then be imported by your Python code. As a general precaution from similar exploits, you should not execute Python code from this directory
┌────────────────────────────────────────────────────────────────────┐
│ Sage Version 6.5, Release Date: 2015-02-17                         │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                            │
└────────────────────────────────────────────────────────────────────┘
sage: quit()
Exiting Sage (CPU time 0m0.19s, Wall time 3m1.92s).

I also tried it with sage in

/Applications/sage

Same problems.

and I also tried installing the Sage.app (in Applications), but this failed as well (Error 500, presumably for the same reasons as the above errors)

The permissions in my home folder install are

usrname (ME) read and write, staff Read only, everyone Read only

My /Applications folder additionally has (this motivated me to try it in the home folder)

system read and write

I have checked that I'm using the right sage install by using for my sage command

sudo ln -s ~/sage/sage /usr/local/bin/sage

and checking that I was not overriding this with something else in my path. Also,

usrname:sage usrname$ which sage
/usr/local/bin/sage
edit retag flag offensive close merge delete

Comments

Reading related posts... does it matter that I did this:

sudo cp -r /Volumes/sage-6.5-x86_64-Darwin/sage ~/
alejandroerickson gravatar imagealejandroerickson ( 2015-03-19 23:37:42 +0100 )edit

2 Answers

Sort by » oldest newest most voted
1

answered 2015-03-20 00:11:51 +0100

tmonteil gravatar image

It seems that you installed Sage as the root user, which is not the correct way. If you plan to launch the sage command from the usrname user, you can go into your Sage directory and type :

sudo chown -R usrname:usrname .

(don't forget the dot at the end). Then you can launch Sage as the user usrname:

./sage
edit flag offensive delete link more

Comments

Thank you! What a silly pitfall :(. I did it by reinstalling without sudo, but this would be faster.

alejandroerickson gravatar imagealejandroerickson ( 2015-03-20 11:29:14 +0100 )edit
0

answered 2016-09-15 14:13:28 +0100

dowewas2 gravatar image

Try creating a new folder and then running sage in it

sage

The error should no longer appear.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-03-19 23:32:14 +0100

Seen: 1,612 times

Last updated: Mar 20 '15