httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] ScriptAlias file permissions deny execution
Date Wed, 19 Apr 2006 17:36:12 GMT
On 4/19/06, DeVelvis, Ralph (US SSA) <ralph.develvis@baesystems.com> wrote:
> It says file permissions deny execution.

No, that's not an exact quote.  When you paraphrase error messages,
you make things much more difficult.

>
> I haven't done:
>
> su - nobody
> cd /full/path/to/cgi-bin
> ./cgi-script
>
> I did do this:
>
> su - nobody -c /full/path/to/cgi-bin/cgi-script
>
> and the script runs.

If I guessed correctly about what your *real* error message is, then
the following is the code that is failing.  This implies either the
userid running apache isn't what you think it is, or the permissions
are not correct.

API_EXPORT(int) ap_can_exec(const struct stat *finfo)
{
#ifdef MULTIPLE_GROUPS
    int cnt;
#endif
#if defined(OS2) || defined(WIN32) || defined(NETWARE)
    /* OS/2 dosen't have Users and Groups */
    return 1;
#else
    if (ap_user_id == finfo->st_uid)
	if (finfo->st_mode & S_IXUSR)
	    return 1;
    if (ap_group_id == finfo->st_gid)
	if (finfo->st_mode & S_IXGRP)
	    return 1;
#ifdef MULTIPLE_GROUPS
    for (cnt = 0; cnt < NGROUPS_MAX; cnt++) {
	if (group_id_list[cnt] == finfo->st_gid)
	    if (finfo->st_mode & S_IXGRP)
		return 1;
    }
#endif
    return ((finfo->st_mode & S_IXOTH) != 0);
#endif
}

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message