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

NEW FEATURE: support file permissions #209

Open
feyst opened this issue Jul 24, 2021 · 6 comments · May be fixed by #269
Open

NEW FEATURE: support file permissions #209

feyst opened this issue Jul 24, 2021 · 6 comments · May be fixed by #269
Assignees
Labels
enhancement New feature or request

Comments

@feyst
Copy link

feyst commented Jul 24, 2021

Bug Description
When I only change the mode of a file (chmod +x ./src/file), then commit the change and push it.
The ftp script does not seem to recognice the change. and does not alter the destination file mode.

My Action Config

on: push
name: 🚀 Deploy website on push
jobs:
  web-deploy:
    name: 🎉 Deploy
    runs-on: ubuntu-latest
    steps:
      - name: 🚚 Get latest code
        uses: actions/checkout@v2

      - name: Install dependencies
        uses: php-actions/composer@v6

      - name: 📂 Sync files
        uses: SamKirkland/[email protected]
        with:
          server: ${{ secrets.ftp_host }}
          protocol: ftps
          username: ${{ secrets.ftp_username }}
          password: ${{ secrets.ftp_password }}```

My Action Log

⚖️  File content is the same, doing nothing: src/file
@SamKirkland SamKirkland self-assigned this Jul 26, 2021
@SamKirkland SamKirkland added the enhancement New feature or request label Jul 26, 2021
@SamKirkland
Copy link
Owner

Currently this action does not support setting file permissions.

Keep in mind the only information git stores about the file is if it can be executed or not. You should have to update that via the update-index command (chmod would not save the information to git).

I have marked this issue as a enhancement. If other users request this feature it could be added via a new option specifying the file types to make executable, or by using the information set via update-index

@SamKirkland SamKirkland changed the title chmod +x change is not detected NEW FEATURE: support file permissions Oct 11, 2021
@thorst
Copy link

thorst commented Dec 19, 2021

Yes, this would be nice to specify a file and the permissions it needs

@timthelion
Copy link

I need this, but unfortunately it ain't gonna be easy as the library FTP-Deploy-Action uses to upload to FTP doesn't support this for all FTP servers:

patrickjuchli/basic-ftp#9

timthelion added a commit to timthelion/ftp-deploy that referenced this issue Feb 2, 2022
timthelion added a commit to timthelion/ftp-deploy that referenced this issue Feb 2, 2022
timthelion added a commit to timthelion/ftp-deploy that referenced this issue Feb 2, 2022
timthelion added a commit to timthelion/ftp-deploy that referenced this issue Feb 2, 2022
@timthelion timthelion linked a pull request Feb 2, 2022 that will close this issue
@timthelion
Copy link

timthelion commented Feb 2, 2022

I implemented this today. There is a pull request waiting review.

@timthelion
Copy link

@SamKirkland you can just add a chmod step in the github action flow file before the file sync if you need exotic file permissions. In my specific case, I had a hosting provider who's default file permissions were non-readable, so I just need to sync sane file permissions.

timthelion added a commit to timthelion/ftp-deploy that referenced this issue Feb 13, 2022
@timthelion
Copy link

You can use my fork ex: https://github.com/vegan-buddies/vegan-buddies/blob/20e437da95379930c7dd05cecd87f6fe1801fee0/.github/workflows/website.yml#L34
. Unfortunately, I don't have time to redo the pull request with the better design. Sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants