I have bitbucket-pipeline setup so my site is deployed to the server via bitbucket on every pushed commit. However the deployment process constantly alters my folder and file permissions, folders to 777 and files to 666. What do I need to do to make sure my directory and file permissions never change on deployment or atleast how do I change the file permissions after deployment. My directories need to be 777, and my files need to be 666.

My bitbucket-pipeline below:

pipelines:
  default:
    - step:
        script:
          - echo "This script runs on all branches that don't have any specific pipeline assigned in 'branches'."
  branches:
    develop:
      - step:
          name: Deploy to develop
          deployment: test
          trigger: automatic
          script:
          - pipe: atlassian/sftp-deploy:0.3.1
            variables:
              USER: '.....'
              SERVER: '.....'
              REMOTE_PATH: '...../wp-content/themes/mytheme/'
              LOCAL_PATH: ${BITBUCKET_CLONE_DIR}/*

0 Answers