tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 47880] New: Lack of +x permissions on script files results cryptic and confusing error messages
Date Sun, 20 Sep 2009 15:55:21 GMT

           Summary: Lack of +x permissions on script files results cryptic
                    and confusing error messages
           Product: Tomcat 6
           Version: 6.0.20
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Native:Packaging

After the user downloads and extracts the .zip archive containing Tomcat
executables, the "executable" flag on the .sh files is not set by default. This
results unexpected and very cryptic error messages about the missing files
(just because is not executable) and later about the incorrect
pathes (just because is not executable). This is observed when
the tries to executes with sh command.

The problem is not obvious because the files with these improper permissions
are not executed by the user from the command line. Instead, they are executed
calling them from another scripts. The failure to execute is
especially confusing as causes only warnings bout some problems with pathes.

I suggest the following change in that would make the permission
problem obvious:

# Check that target executable exists
if $os400; then
  # -x will Only work on the os400 if the files are: 
  # 1. owned by the user
  # 2. owned by the PRIMARY group of the user
  # this will not work if the user belongs in secondary groups
  if [ ! -e "$PRGDIR"/"$EXECUTABLE" ]; then
    echo "Cannot find $PRGDIR/$EXECUTABLE"
    echo "This file is needed to run this program"
    exit 1
  if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
    echo "The $PRGDIR/$EXECUTABLE is not executable"
    echo ".sh files must have the executable flag set"
    exit 1

Steps to reproduce:

1. Use the recent Tomcat distribution, Do not use
tar.gz as it may preserve the correct permissions.
2. Extract into any empty directory and try to run You will get the
message about missing that is not correct. After you set +x for you will get more messages that are never about permissions,
leading analysis in confusing directions.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message