Perhaps this is an apache server question, rather than a php
question. But I want to use a simple php upload script in
a user-home-sub-document-root dir on a standard linux box.
If php is a mod.so it is the apache process that does the
uploading, so it cannot upload into a directory that belongs
to "username" unless the file permissions are 777,
or perhaps......so me way to use group permissions that
allows the apache process to write to a directory whose
group bit is readable and writable.
I tried creating a new group definition in /etc/group
and then made the apache pseudo user a member, as well
as a test user, and then set the directory permission
on that user's public_html directory to 775
But the upload process still throws an error message.
There must be a way to do this, without setting the dir
permission to 777
Is running php as a cgi and then wading through all the
suexec pitfalls the only alternative to 777 permissions?
question. But I want to use a simple php upload script in
a user-home-sub-document-root dir on a standard linux box.
If php is a mod.so it is the apache process that does the
uploading, so it cannot upload into a directory that belongs
to "username" unless the file permissions are 777,
or perhaps......so me way to use group permissions that
allows the apache process to write to a directory whose
group bit is readable and writable.
I tried creating a new group definition in /etc/group
and then made the apache pseudo user a member, as well
as a test user, and then set the directory permission
on that user's public_html directory to 775
But the upload process still throws an error message.
There must be a way to do this, without setting the dir
permission to 777
Is running php as a cgi and then wading through all the
suexec pitfalls the only alternative to 777 permissions?
Comment