Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission inheritance problems #192

Open
ttodua opened this issue Dec 20, 2024 · 0 comments
Open

Permission inheritance problems #192

ttodua opened this issue Dec 20, 2024 · 0 comments

Comments

@ttodua
Copy link

ttodua commented Dec 20, 2024

this action seems to have some permission & inheritance issues.
for example, setup a directory on a remote machine with this:

sudo addgroup group1
adduser githubuser
usermod -aG group1 githubuser
usermod -aG group1 www-data
sudo chown -R :group1 /var/www/
sudo chmod -R 2770 /var/www/
# inherit permissions on created folders & files within dir
setfacl -R -d -m g::rwx /var/www/

then, when using:

      - name: copy file via ssh password
        uses: appleboy/[email protected]
        with:
          host: ${{ secrets.TEST_HOST }}
          port: ${{ secrets.TEST_PORT }}
          username: ${{ secrets.TEST_USERNAME }}
          password: ${{ secrets.TEST_PASSWORD }}
          source: "!.git,*"
          target: /var/www/
          strip_components: 0
          overwrite: true

so, folders from your repo, after they are copied (through ssh) to remote /var/www/ dir, the copied folders there are having 2750 permissions, instead of 2770, causing other group users (eg www-data) being unable to access those file/folders.

so, it's crucial that group permissions were correctly inherited.
any thoughts? thanks

@ttodua ttodua changed the title Permission inheritance Permission inheritance problems Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant