I have a program (site_bot, found at phpclasses.org)
that
1) recursively reads a file system starting at
locationA, and stores lots of filesystem info
in a mysql schema on the fly.
2) mirrors the directory structure found at locationA
to locationB
3) processes the info in the schema and writes static
html code into the mirrored directory structure
at locationB.
This code works flawlessly at several (edu) sites where
the nefarious safe_mode is Off. I recently tried
to set this code up on in commercial virtual host
environment, and ran into catch22 at every step.
With safe_mode On, user apache cannot mkdir recursively
inside a filesystem that belongs to login user.
If I chown the program code and the write_to directory
so they belong to the apache pseudo user, then the
apache process has the requisite write access, but
fails when trying to read the source directory (locationA).
chmod 777 on the source dir doesn't seem to fix the
read access problem (for user apache).
This is a showstopper, because the whole system
revolves around the user's ability to add images,
text files and html fragments to locationA (to
become generated html).
If the host provider refuses to turn off safe_mode,
is there any other way to (to set file permissions
or whatever) so php with safe mode can read from
user files and write the server side file system.
My host provider doesn't even seem to understand
the problem, let alone know how to fix it.
that
1) recursively reads a file system starting at
locationA, and stores lots of filesystem info
in a mysql schema on the fly.
2) mirrors the directory structure found at locationA
to locationB
3) processes the info in the schema and writes static
html code into the mirrored directory structure
at locationB.
This code works flawlessly at several (edu) sites where
the nefarious safe_mode is Off. I recently tried
to set this code up on in commercial virtual host
environment, and ran into catch22 at every step.
With safe_mode On, user apache cannot mkdir recursively
inside a filesystem that belongs to login user.
If I chown the program code and the write_to directory
so they belong to the apache pseudo user, then the
apache process has the requisite write access, but
fails when trying to read the source directory (locationA).
chmod 777 on the source dir doesn't seem to fix the
read access problem (for user apache).
This is a showstopper, because the whole system
revolves around the user's ability to add images,
text files and html fragments to locationA (to
become generated html).
If the host provider refuses to turn off safe_mode,
is there any other way to (to set file permissions
or whatever) so php with safe mode can read from
user files and write the server side file system.
My host provider doesn't even seem to understand
the problem, let alone know how to fix it.
Comment