Ask Your Question

Copy file to a different project

asked 2014-05-18 18:09:37 -0500

dart2163 gravatar image

updated 2015-01-13 11:07:38 -0500

FrédéricC gravatar image

What is the best way to copy a file from one project to another? I want to do this because I want to share/collaborate this file with others - but I don't want to share the other files in the project.

edit retag flag offensive close merge delete


I assume this is a Sage math cloud question?

kcrisman gravatar imagekcrisman ( 2014-05-19 03:21:33 -0500 )edit

I've been just downloading and the uploading into the second project. I think there is a more efficient approach using github. But, as I understand it at the moment, you cannot copy between projects in SMC.

calc314 gravatar imagecalc314 ( 2014-05-19 11:18:30 -0500 )edit

2 answers

Sort by » oldest newest most voted

answered 2014-06-29 10:15:08 -0500

William Stein gravatar image

We haven't implemented this feature for SageMathCloud yet, but will. In the meantime, the only way to solve this problem that stays entirely in SMC is to setup ssh key access between the two projects, use scp or rsync, and to use the ip address displayed when you type "/sbin/ifconfig tun0" for each machine.

edit flag offensive delete link more

answered 2014-06-29 10:00:34 -0500

This is not possible in general because the files in your project A are probably on a different virtual machine than your project B. However, there is the rare possibility that they happen to be on the same machine. In this case, because SMC is just Linux, the following may be possible after you open a terminal in both project A and B:

projectA> ls -l $HOME/filename
-rw-rw---- 1 xyz xyz 31 Jun 21 11:59 /projects/xyz/filename
projectA> chmod o+r $HOME/filename
projectA> ls -l $HOME/filename
-rw-rw-r-- 1 xyz xyz 31 Jun 21 11:59 /projects/xyz/filename

... where xyz is the project ID of project A. Now, in that rare case you should be able to do from the project B terminal:

projectB> cp /projects/xyz/filename .

Don't forget to change back permissions with:

projectA> chmod o-r $HOME/filename
projectA> ls -l $HOME/filename
-rw-rw---- 1 xyz xyz 31 Jun 21 11:59 /projects/xyz/filename

See also the Wikipedia page about chmod.

edit flag offensive delete link more


There is less than a 5% probability this will work...

William Stein gravatar imageWilliam Stein ( 2014-06-29 10:11:59 -0500 )edit

Your Answer

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

Add Answer

Question Tools


Asked: 2014-05-18 18:09:37 -0500

Seen: 448 times

Last updated: Jun 29 '14