LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   file permissions w/apache php (https://www.linuxquestions.org/questions/linux-newbie-8/file-permissions-w-apache-php-2003/)

caguru 04-21-2001 07:54 PM

Hello everyone.
I am new to this board, and fairly new to Linux. All of my remote web servers run linux and to this point it has made sense. Here's my dilema (probably as easy as 2+2 for yall)...

I am adding a GUI for one of my sites that will allow others with access to a password protected directory to maintain the MYSQL and the PHP pages without any knowledge of scripting.

I made several PHP files in a password protected directory that rewrite the public PHP files. Now this works without flaw on my windows2000pro machine but not on my webserver. In fact the only way I can get the hidden files to rewrite the public files is to CHMOD the public files to 777. That can't be right. I was under the impression that would allow all public users to modify the files and that is definitely not my goal.

If I remove public write access on the target file, I receive errors such as permission denied or could not include file.

Someone please explain this to me. Remember I am a windows user so I don't really understand linux lingo. I wish I did though.

jeremy 04-25-2001 08:17 PM

If you don't want the files 777 you would need to own them to the user or group of the web server and make sure they are writable.

caguru 04-25-2001 10:50 PM

owner nobody
 
I was recently told that I can write to the files via PHP if the owner was set to nobody. Can the owner be set to nobody via SSH on a virtual host?

If not how does the owner or group access the file rewriting pages via http. My GUI is totally built from PHP in a hidden directory.

Thanks for the input.

jeremy 04-26-2001 07:52 AM

Apache is often setup to run as nobody. To change file ownership you would use chmod. To change group ownership you would use chgrp.


All times are GMT -5. The time now is 12:58 PM.