After the travis-ci is successfully built, the file is copied. The destination folder does not have write permission. How to give the user write permission?

.travis.yml

language: node_js
node_js:
- "8.9.1"
branchs:
  only:
  - master
cache:
  apt: true
  directories:
  - node_modules
install:
- git pull
- rm -f package-lock.json && npm install 
script:
- npm run build
before_install:
- openssl aes-256-cbc -K $encrypted_1db7356b8c0c_key -iv $encrypted_1db7356b8c0c_iv
  -in id_rsa.enc -out ~/.ssh/id_rsa -d
after_success:
- chmod 600 ~/.ssh/id_rsa
- scp -o stricthostkeychecking=no -r ./dist/* travis@xxx.xx.xxx.xx:/var/www/mobile

to the last step

 -r ./dist/* travis@xxx.xx.xxx.xx:/var/www/mobile

prompt that Permisson denied, does not have permission.
clipboard.png
root@118.24.157.36

clipboard.png

ask how to give travis users permission to write / var/www/mobile.

Feb.25,2022

chomd 0777

Menu