httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 52817] New: Long directory path sucks (but it's really a valid path!!!)
Date Sat, 03 Mar 2012 23:44:40 GMT

             Bug #: 52817
           Summary: Long directory path sucks (but it's really a valid
           Product: Apache httpd-2
           Version: 2.4.1
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
    Classification: Unclassified

Hi, sorry, maybe it's a little bit weird. But I do have a very long directory
path (but not that long to exceed the buffer length 16*1024*1024) to put in my
configuration file, like 

ServerRoot /very/long/directory/path

Then, the apache tells: 
"httpd: Syntax error on line 33 of /home/tianyin/apache-2.4.1/conf/httpd.conf:
ServerRoot must be a valid directory"

But I have to say that it is for sure a valid directory. I can use "cd" to go
to that directory. 

When looking at the source code, the problem seems that it uses the "stat" to
check the path state and simply check the return value (0 for success, 1 for

I think it's necessary to check the errno and tell users the exact problem
instead of just saying "invalid" (I have to say this bugs me a while), for

EACCES Search permission is denied for one of the directories in the path
prefix of path.  (See also path_resolution(7).)

EBADF fd is bad.

EFAULT Bad address.

ELOOP  Too many symbolic links encountered while traversing the path.

ENAMETOOLONG File name too long.

ENOENT A component of path does not exist, or path is an empty string.

ENOMEM Out of memory (i.e., kernel memory).

ENOTDIR A component of the path prefix of path is not a directory.

EOVERFLOW (stat()) path refers to a file whose size cannot be represented in
the type off_t.

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