[ https://issues.apache.org/jira/browse/BCEL-375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary D. Gregory updated BCEL-375: --------------------------------- Assignee: Gary D. Gregory > Wrong permissions on bcel .jar file in binary .tar.gz distribution file > ----------------------------------------------------------------------- > > Key: BCEL-375 > URL: https://issues.apache.org/jira/browse/BCEL-375 > Project: Commons BCEL > Issue Type: Bug > Components: Build > Affects Versions: 6.9.0, 6.10.0 > Environment: * OS: macOS Sequoia 15.2 > * Architecture: ARM64 > * Package manager: Homebrew 4.4.15 > * Ant version: 1.10.15 > * BCEL version: 6.9.0 > > Reporter: J. Lewis Muir > Assignee: Gary D. Gregory > Priority: Major > > In the TAR bcel 6.10.0 binary distribution file > https://dlcdn.apache.org//commons/bcel/binaries/bcel-6.10.0-bin.tar.gz > the file {{bcel-6.10.0/bcel-6.10.0.jar}} is only readable by the owner: > {code:sh} > $ tar -tzvf bcel-6.10.0-bin.tar.gz | grep bcel-6.10.0.jar > -rw------- 0 root root 740158 Jul 13 13:11 bcel-6.10.0/bcel-6.10.0.jar > {code} > The permissions should instead be: > {code:sh} > -rw-r--r-- 0 root root 740158 Jul 13 13:11 bcel-6.10.0/bcel-6.10.0.jar > {code} > The permissions are correct for the other {{.jar}} files in the archive; it's > just {{bcel-6.9.0.jar}} that is wrong: > {code:sh} > $ tar tzvf bcel-6.9.0-bin.tar.gz | grep .jar > -rw-r--r-- 0 root root 3986370 Apr 21 2024 > bcel-6.9.0/bcel-6.9.0-javadoc.jar > -rw-r--r-- 0 root root 701260 Apr 21 2024 > bcel-6.9.0/bcel-6.9.0-sources.jar > -rw-r--r-- 0 root root 273817 Apr 21 2024 > bcel-6.9.0/bcel-6.9.0-test-sources.jar > -rw-r--r-- 0 root root 528274 Apr 21 2024 > bcel-6.9.0/bcel-6.9.0-tests.jar > -rw------- 0 root root 738607 Apr 21 2024 bcel-6.9.0/bcel-6.9.0.jar > {code} > All other files in the archive are readable by group and other. This creates > a problem for any package manager or human who extracts the archive and > preserves the permissions without ensuring that all permissions are correct > because the extracted {{bcel-6.10.0.jar}} will only be readable by the owner, > and if the owner is {{root}} or some other admin account, normal users on the > system won't be able to read the file. > The same problem also exists in {{bcel-6.9.0-bin.tar.gz}}. > My actual use case is that I've installed Ant via Homebrew, and BCEL is a JAR > that gets installed for Ant, and Homebrew just extracts the BCEL TAR archive, > preserving the permissions, and when I run an Ant task for my project to > generate Javadocs, I get a "Permission Denied" error when it tries to read > {{bcel-6.9.0.jar}} because it's only readable by the owner, and I'm not the > owner: > {code:sh} > $ ant javadoc > [...] > javadoc: > [javadoc] Generating Javadoc > [javadoc] Javadoc execution > [javadoc] error: error reading > /opt/homebrew/Cellar/ant/1.10.15/libexec/lib/bcel-6.9.0.jar; > /opt/homebrew/Cellar/ant/1.10.15/libexec/lib/bcel-6.9.0.jar (Permission > denied) > [javadoc] 1 error > {code} > I can't read that file: > {code:sh} > $ ls -l /opt/homebrew/Cellar/ant/1.10.15/libexec/lib/bcel-6.9.0.jar | awk '{ > print $1 }' > -rw------- > $ cat /opt/homebrew/Cellar/ant/1.10.15/libexec/lib/bcel-6.9.0.jar > /dev/null > cat: /opt/homebrew/Cellar/ant/1.10.15/libexec/lib/bcel-6.9.0.jar: Permission > denied > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)