Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure scp destination directories exist (with mkdir -p) #4977

Merged
merged 2 commits into from Feb 9, 2014

Conversation

minrk
Copy link
Member

@minrk minrk commented Feb 1, 2014

in SSH launchers.

As described in #3411

closes #3411

@takluyver
Copy link
Member

I think there is os.path.makedirs() for the local case.

@minrk
Copy link
Member Author

minrk commented Feb 1, 2014

Right, uses os.makedirs for the local case now.

@@ -623,6 +628,9 @@ def _fetch_file(self, remote, local):
time.sleep(1)
elif check == u'yes':
break
local_dir = os.path.dirname(local)
if not os.path.exists(local_dir):
os.makedirs(local_dir)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only now I look at the docs, I see directories are created in mode 777 (world writable) by default. I'm not sure what files might be fetched, but I guess we might want something like 775.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ellisonbg ellisonbg added this to the 2.0 milestone Feb 5, 2014
@ellisonbg
Copy link
Member

After the dir permissions are changed will this one be ready for merging?

@minrk
Copy link
Member Author

minrk commented Feb 9, 2014

permissions changed

@ellisonbg
Copy link
Member

Looks good, merging.

ellisonbg added a commit that referenced this pull request Feb 9, 2014
ensure scp destination directories exist (with mkdir -p)
@ellisonbg ellisonbg merged commit d522a1b into ipython:master Feb 9, 2014
@minrk minrk deleted the scp-mkdir-p branch March 31, 2014 23:36
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
ensure scp destination directories exist (with mkdir -p)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ipython parallel: scp failure.
3 participants