When I deploy files to a cPanel account, the permissions given to files is 666 and directories 777. On my local machine, they are 644 and 755 respectively.
I found this:
https://support.atlassian.com/bitbucket-cloud/kb/manage-file-permissions-in-bitbucket-cloud-pipelines/
So I've updated my bitbucket-pipelines.yml to this:
pipelines:
branches:
"*":
- step:
name: "Build and Set Permissions"
caches:
- docker
services:
- docker
script:
- find . -type d -exec chmod 755 {} \;
- find . -type f -exec chmod 644 {} \;
- DOCKER_BUILDKIT=1 docker image build --no-cache --progress=plain .
main:
- step:
name: "Deploy to live"
script:
- pipe: atlassian/sftp-deploy:0.10.0
variables:
USER: $SFTP_USERNAME_LIVE
SERVER: $SFTP_LOCATION_LIVE
REMOTE_PATH: "public_html/"
LOCAL_PATH: "./"
... but it's still creating files on the server with 666 / 777 permissions.
Any help appreciated! Thanks in advance.