Ask Your Question
0

Copy file to a different project

asked 2014-05-19 01:09:37 +0100

dart2163 gravatar image

updated 2015-01-13 18:07:38 +0100

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

Comments

I assume this is a Sage math cloud question?

kcrisman gravatar imagekcrisman ( 2014-05-19 10:21:33 +0100 )edit
1

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 18:18:30 +0100 )edit

2 Answers

Sort by » oldest newest most voted
1

answered 2014-06-29 17:15:08 +0100

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
0

answered 2014-06-29 17:00:34 +0100

rws gravatar image

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

Comments

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

William Stein gravatar imageWilliam Stein ( 2014-06-29 17:11:59 +0100 )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

Stats

Asked: 2014-05-19 01:09:37 +0100

Seen: 1,147 times

Last updated: Jun 29 '14