Successfully pack charm with incorrect charm.py file permission
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
### Bug Description
Packing the charm with `src/charm.py` without execute permission will result in produced charm to fail with `unit.content-cache/0.install /var/lib/juju/agents/unit-content-cache-0/charm/dispatch: 3: exec: ./src/charm.py: Permission denied` when deployed with juju.
charmcraft should either warn/error out or fix the file permission for `src/charm.py` when packing the charm.
### To Reproduce
- Start with any working charm.
- Set the `src/charm.py` to without execute permission, e.g., `chmod -x src/charm.py`.
- Pack the charm with `charmcraft pack`, then deploy with `juju deploy {PATH_TO_CHARM_PACKED}`.
### Environment
Host: Ubuntu 22.04 LTS
Charm: deployed on LXD container and machine on 22.04
### charmcraft.yaml
```yaml
This issue is not related to the charmcraft.yaml
```
### Relevant log output
```shell
The error when juju deploy:
`unit.content-cache/0.install /var/lib/juju/agents/unit-content-cache-0/charm/dispatch: 3: exec: ./src/charm.py: Permission denied`
```
Evaluation history
No evaluation history available.