You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2009/09/20 17:55:21 UTC

DO NOT REPLY [Bug 47880] New: Lack of +x permissions on script files results cryptic and confusing error messages

https://issues.apache.org/bugzilla/show_bug.cgi?id=47880

           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
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: mike.pukuotukas@meska.info


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 catalina.sh is not executable) and later about the incorrect
pathes (just because setclasspath.sh is not executable). This is observed when
the tries to executes startup.sh 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 setclasspath.sh is
especially confusing as causes only warnings bout some problems with pathes.

I suggest the following change in startup.sh 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
  eval
else
  if [ ! -e "$PRGDIR"/"$EXECUTABLE" ]; then
    echo "Cannot find $PRGDIR/$EXECUTABLE"
    echo "This file is needed to run this program"
    exit 1
  fi
  if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
    echo "The $PRGDIR/$EXECUTABLE is not executable"
    echo ".sh files must have the executable flag set"
    exit 1
  fi
fi 

Steps to reproduce:

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

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 47880] Lack of +x permissions on script files results cryptic and confusing error messages

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47880

--- Comment #2 from Audrius Meskauskas <mi...@meska.info> 2009-09-20 09:02:30 PDT ---
The proposed change is contributed public domain if anybody wants it.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 47880] Lack of +x permissions on script files results cryptic and confusing error messages

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47880

--- Comment #5 from Mark Thomas <ma...@apache.org> 2011-04-10 07:28:57 EDT ---
This has been fixed in trunk for 7.0.13 and has been proposed for 6.0.x and
5.5.x.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 47880] Lack of +x permissions on script files results cryptic and confusing error messages

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47880

--- Comment #6 from Mark Thomas <ma...@apache.org> 2011-06-03 08:27:07 UTC ---
Fixed in 6.0.x and will be included in 6.0.33 onwards.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 47880] Lack of +x permissions on script files results cryptic and confusing error messages

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47880

--- Comment #1 from Audrius Meskauskas <mi...@meska.info> 2009-09-20 08:58:58 PDT ---
*** Bug 47877 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 47880] Lack of +x permissions on script files results cryptic and confusing error messages

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47880

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|Native:Packaging            |Native:Packaging
            Version|6.0.20                      |5.5.33
            Product|Tomcat 6                    |Tomcat 5
   Target Milestone|default                     |---

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 47880] Lack of +x permissions on script files results cryptic and confusing error messages

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47880

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #7 from Mark Thomas <ma...@apache.org> 2011-08-18 16:55:55 UTC ---
This has been fixed in 5.5.x and will be included in 5.5.34 onwards.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 47880] Lack of +x permissions on script files results cryptic and confusing error messages

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47880

--- Comment #3 from Pid <bu...@pidster.com> 2009-09-21 02:09:55 PDT ---
Is it possible for the +x bit to be set, or retained, on these files during the
build process for the zip?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 47880] Lack of +x permissions on script files results cryptic and confusing error messages

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47880

--- Comment #4 from Mark Thomas <ma...@apache.org> 2009-09-21 10:19:29 BST ---
Nope. That's why we have .tar.gz distros with unix line endings and appropriate
execute bit settings and .zip distros with Windows line endings.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org