Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Bug: upload! within an `as 'root'` block will fail.

Open
#329 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
ruby
Domain
devops

Research direction

Start by locating the upload! and as entry points and how they invoke scp. Check how the current-user switch is represented, then determine whether the upload can be staged in /tmp and moved into place with the switched privileges. Done means upload! succeeds inside an as "root" block without breaking its existing behavior.

Written by the indexing model from the issue text.

Description

The following will usually fail:

  task :foo do
    on roles(:web) do
      as "root" do
        upload! "/tmp/foo", "/var/bar/cuux"
      end
    end
  end

Since scp will not su to root. Would you accept a PR that allows upload! to upload to /tmp and then mv the file into place, if the current user has been switched?

Dominant language
Ruby
Stars
1.2k
Forks
257
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from capistrano/sshkit

All issues in capistrano/sshkit

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.