Access to files in shared workspace files (shared by another user) from within the terminal

terminal

#1

I have RW access to someone else’s workspace. While logged into my account, I can open up a URL in a new tab in my web browser https://preview.c9users.io/username/workspacename/filename

How can I get access to these files from within my workspace terminal bash? I want to be able to use c9 open https://preview.c9users.io/username/workspacename/filename, for example, but this gives me the content for the cloud9 page asking you to login.

Thanks for your help!


#2

You need to open the IDE for that workspace at https://ide.c9.io/username/workspacename. From there you can access the files in the terminal. The files are located at /home/ubuntu/workspace.

The command c9 open <path> expects a file path and can’t be called with a URL.


#3

Are there any workarounds? I am a high school teacher, and my students use cloud9 and give me read/write access to their private workspaces. I had them name their workspaces in a specific format. I can manually generate links to all of their projects that I want them to submit (by using the preview link to the file). When logged into my c9 account, I can open webpages that download their projects via link. However, I cannot find a way to grab or download their project files via link from within my c9 workspace. Is there a way to do this? Thank you!


#4

If the preview URL is public, you can download the files via the command-line using curl or wget, and then open it:

$ wget https://preview.c9users.io/username/workspacename/filename
$ c9 open filename

#5

So the preview URLs are not public, but the accounts are shared directly with RW access. Any workaround to do this within Cloud9?