← Back to issue list

chmod 777 in autotools plugin

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1951645
Type
issue
State
closed
Author
~sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Fixed in snapcore/snapcraft#3601 (commit 08a347754), replacing the autotools v1 plugin's overly broad permissions with correct permissions for scripts.

Resolution: closed resolved

Reason: PR #3601 was merged in commit 43eb836d8. Its fix, 08a347754, sets correct file permissions for autotools v1 scripts.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Hello, there's a chmod(777) in a snapcraft plugin that's probably far too wide. 1777 sometimes makes sense on directories but most systems will only have a handful of such directories. os.chmod( path, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR | stat.S_IRGRP | stat.S_IWGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IWOTH | stat.S_IXOTH, ) in https://github.com/snapcore/snapcraft/blob/3dca4d860ed0a59f63b70e9e7288dc06027fbcbf/snapcraft/plugins/v1/autotools.py#L90 Can this be reduced to something tighter? Thanks

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed in snapcore/snapcraft#3601 (commit 08a347754), replacing the autotools v1 plugin's overly broad permissions with correct permissions for scripts.
stealth/space-bunny-alpha — closed resolved Autotools v1 stopped applying overly broad 0777 permissions; correct script permissions were implemented in snapcore/snapcraft#3601 via commit 08a347754.
stealth/space-bunny-alpha — closed resolved Fixed in snapcraft#3601 (commit 08a347754): the autotools v1 plugin now sets correct script permissions instead of using overly broad chmod 777 behavior.
qwen/qwen3.6-35b-a3b — — Closed without resolution or linked pull request. The overly permissive chmod 777 in the autotools plugin remains unfixed, indicating the report was abandoned.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The insecure chmod 777 in the autotools plugin was not addressed. The report was abandoned after zero comments and no follow-up actions.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcore/snapcraft#3601 (confidence 99%)

    Merged PR containing commit 08a347754, titled "autotools v1 plugin: set correct file permissions for scripts".

Related issues

Issue Project State Summary Similarity
#3601 autotools v1 plugin: set correct file permissions for scripts (CRAFT-666) snapcraft merged Merged PR #3601 in commit 43eb836d8, fixing Autotools v1 permissions for non-executable autogen.sh and bootstrap scripts and simplifying the implementation.
75%
#1621700 autotools plugin failed with env: ‘./bootstrap’: Permission denied snapcraft (launchpad) closed Autotools now ignores a bootstrap directory instead of executing it, fixing the permission-denied failure in canonical/snapcraft#803 via commit eee1b84dd.
73%
#1530995 Snapcraft requires autogen.sh to be executable snapcraft (launchpad) closed Fixed by ubuntu-core/snapcraft PR #206 (merged as 209a587d7), which made the Autotools plugin set autogen.sh executable before running it.
71%