# Sage and python subprocess

Just installed sage-6.8

From python program I run the following command:

```
res = check_output(["/opt/mathenv/sage-6.8/sage","/opt/mathenv/mathsite/mathsite/scripts/eq_solver.sage","x-5", "x",'-oo', '1', 'oo', '1', '14'])
```

But this piece of code gives me the following error:

```
CalledProcessError: Command '['/opt/mathenv/sage-6.8/sage', '/opt/mathenv/mathsite/mathsite/scripts/eq_solver.sage', 'x-5', 'x', '-oo', '1', 'oo', '1', '14']' returned non-zero exit status 1
```

It works perfectly if I enter the command directly in shell, so there are no errors with the script.

I've managed to get the error:

```
Setting permissions of DOT_SAGE directory so only you can read and write it.
os.chmod(DOT_SAGE, _desired_mode)\nOSError: [Errno 1]
Operation not permitted: \'/var/www/.sage/'
```

How can I fix it?