On further investigation moving my public_html folder and contents
to /root and removing my mapping from cgiwrap.userdir has allowed the
script to work.
i.e letting cgiwrap resolve the user dir naturally and not mapping
so my question becomes how to use cgiwrap.userdir to map root to cgi-bin
location - are there some ./configure options I need to use ?
On Mon, 2008-11-24 at 16:41 +0000, k.s.guleesh wrote:
> Hi ,
> I have rolled my own cgiwrap config but I'm stumped at this point.
> I have configured a virtual host with
> ScriptAlias /cgi-bin/ /admin/public_html/cgi-bin/
> and I have built the cgiwrap binary into /admin/public_html/cgi-bin/
> (I only want that virtual host to have access to it).
> Here's my cgiwrap output -
> Initializing Logging
> Redirecting STDERR to STDOUT
> Setting SIGXCPU to default behaviour
> Environment Variables:
> QUERY_STRING: ''
> SCRIPT_NAME: '/cgi-bin/cgiwrapd'
> SCRIPT_FILENAME: '/admin/public_html/cgi-bin/cgiwrapd'
> REDIRECT_URL: '<NULL>'
> PATH_INFO: '/root/test.cgi'
> PATH_TRANSLATED: '/admin/public_html/root/test.cgi'
> REMOTE_USER: '<NULL>'
> REMOTE_HOST: '<NULL>'
> REMOTE_ADDR: '127.0.0.1'
> Trying to extract user from PATH_INFO.
> Retrieved User Name: 'root'
> User Data Retrieved:
> UserID: 'root'
> UID: '0'
> GID: '0'
> Home Dir: '/root'
> Checking remote host information.
> Checking user minimum uid.
> Checking user shell.
> Global Deny File: '/etc/cgiwrap/cgiwrap.deny'
> Global Allow File: '/etc/cgiwrap/cgiwrap.allow'
> Checking Access Files:
> Deny file exists: '/etc/cgiwrap/cgiwrap.deny'
> Allow file exists: '/etc/cgiwrap/cgiwrap.allow'
> Checking deny file for 'root'
> Checking allow file for 'root'
> Found 'root'
> Processing user directory configuration file.
> Using configured base directory.
> Script Base Directory: '/admin/public_html/cgi_bin'
> * CGIWrap Error *
> The specified user does not have a script directory set up
> for execution of cgi scripts, or the directory permissions
> prevent cgiwrap from using that directory.
> Now I mapped root to that folder via the cgiwrap.userdir config so I'm imagining it is perhaps to do with directory permissions which are all 755
> I remember coming across some docs somewhere that explained the permission checking process but I can't seem to find it now that I need it.
> for completeness here are the ./configure options I used
> ./configure --mandir=/usr/share/man \
> --infodir=/usr/share/info \
> --with-install-group=www-data --with-install-user=root \
> --with-local-doc-url=/doc/cgiwrap \
> --with-cgi-dir=public_html/cgi-bin --with-httpd-user=www-data \
> --with-minimum-uid=0 \
> --with-logging-file=/var/log/cgiwrap.log \
> --with-allow-file=/etc/cgiwrap/cgiwrap.allow \
> --with-deny-file=/etc/cgiwrap/cgiwrap.deny \
> --with-host-checking --with-check-shell \
> --with-rewrite=/etc/cgiwrap/cgiwrap.userdir \
> --with-quiet-errors \
> Any ideas ?