Skip to content

Permission inheritance problems #192

Open
@ttodua

Description

@ttodua

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/scp-action@v0.1.7
        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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions