LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   Apache2 upload fileperms problem (https://www.linuxquestions.org/questions/suse-opensuse-60/apache2-upload-fileperms-problem-359512/)

Martin Fischer 09-02-2005 10:17 AM

Apache2 upload fileperms problem
 
Hi all

How can I define, what file perms my uploaded files with php/apache2 get? Right now it's 600 with user/group apache.apachegroup (sorry, this forum doesn't let me write the true names...). This way uploaded files are not even accessable to the domain-user.

Under apache 1.3 it worked correctly, but with apache 2.0.48 it goes wrong.

My system: Suse Linux 9.0 - Apache 2.0.48, PHP 4.3.4

Thanks for any hints!

Kind regards
Martin Fischer

spooon 09-03-2005 03:57 AM

I'm not sure I understand what you're asking. So you have a PHP script, and it allows you to upload a file and save it on the server. But the files it creates have permission 600 which are not accessible to other people. Is this correct?

I'm not sure how to fix this. One thing I can suggest is that in the PHP script do something like
Code:

chmod('somefile', 0644);
to change the permission to something acceptable


All times are GMT -5. The time now is 03:04 PM.