Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,476
Community Members
 
Community Events
184
Community Groups

SFTP deploy - permissions denied (cannot write) pipeline status successfull

Hi, I'm trying to connect to SFTP using this pipeline: I a total newbie to pipelines and I couldn't figure it out. I have two questions:

  1. Why I have permission to write new files but not to overwrite existing (the result is 0 sized file) and not create directories?
  2. Why it returns "successful"? It has "deleted" all files I have changed, doesn't have permission to write - I would like to see big fail notice.

Thanks for your help in advance

My code here:

pipelines:
 branches:
   master:   
   - step:
       name: Deploy to staging
       deployment: staging
       script:
         - pipe: atlassian/sftp-deploy:0.5.5
           variables:
             USER: '$FTP_USERNAME'
             SERVER: 'example.sftp.wpengine.com'
             REMOTE_PATH: '/wp-content/themes/getmanta-portal/'
             PASSWORD: '$FTP_PASSWORD'
             EXTRA_ARGS: '-P 2222 -oStrictHostKeyChecking=false'

 

The result looks like this:

Permissions denied:

screenshot-bitbucket.org-2020.04.28-10_43_28.png

And when I tried to deploy to an empty folder it wasn't able to recreate the file structure:screenshot-bitbucket.org-2020.04.28-10_46_10.png

3 answers

Any bitbucket official person please take a look into this issue. I am also stuck in such senario when I tried to push changes to WPEngine through sftp pipeline I'm getting same issues like above permission denied

I am still having this problem. I can not copy new folder which doesn't exists on server. I am trying to upload fresh copy so there is not folder -subfolder on server. How to resolve this issue? I am able to transfer files but not folder.

Pipelines-—-Bitbucket.png

Sounds like I'm having a nearly identical experience. Except my files don't seem to be emptied/deleted like @kybernaut , just no change.

 

Trying to use BitBucket Pipelines SFTP to deploy to WPEngine.

The SFTP credentials work fine when using them in a FTP client like macOS Transmit.

But when using them with…

- pipe: atlassian/sftp-deploy:0.5.5

 …I get similar logs to @kybernaut :

  • remote open(FILE): Permission denied
  • Uploading of file FILE to FILE failed!
  • Couldn't setstat on FILE: Permission denied

Then the last lines are…

Transferred: sent 22608, received 15408 bytes, in 17.8 seconds
Bytes per second: sent 1266.9, received 863.4
debug1: Exit status 0
✔ Deployment finished. 

…but nothing on the server has changed 😐.

 

My bitbucket-pipelines.yml

options:
max-time: 5

image: atlassian/default-image:2

definitions:
steps:
- step: &Build-frontend-assets
name: Build Front end CSS and JS assets
caches:
- node
image: node:14.1.0
script:
- npm install
- npm run start
artifacts:
- wp-content/themes/*/assets/**
- step: &Deploy-SFTP
name: Deploy via SFTP
script:
- pipe: atlassian/sftp-deploy:0.5.5
variables:
USER: $SFTP_USER
SERVER: $SFTP_SERVER
REMOTE_PATH: $SFTP_REMOTE_PATH
LOCAL_PATH: ${BITBUCKET_CLONE_DIR}/$SFTP_LOCAL_PATH
PASSWORD: $SFTP_PASSWORD
EXTRA_ARGS: '-v -P $SFTP_PORT'

pipelines:
branches:
master:
- step: *Build-frontend-assets
- step:
<<: *Deploy-SFTP
deployment: staging
- step:
<<: *Deploy-SFTP
deployment: production
trigger: manual 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events