[PHP] File permitions
I've a web-site developed in Perl and, now, I'm converting it to PHP. I've a private directory in my site where I store the counter data (number of visitors, since when, last date) and other information like name, e-mail address, etc. of people who fill a form into the site. In Perl those files were created automatically, even the directory had 700 on permitions, in PHP I've to set it to 777, opening the access to those files to everyone. Is there any possibility to write to files as httpd or system (which can write to files even with 000 permitions)? Thank you, Manuel Silva [EMAIL PROTECTED] - Visite http://www.lusoweb.pt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] File permitions
So sprach »[EMAIL PROTECTED]« am 2001-09-23 um 19:08:20 +0100 : Is there any possibility to write to files as httpd or system (which can write to files even with 000 permitions)? With 000 permissions? Is system an alias for root? If not, then it's not possible. But normally the files should only need access for the group running the webserver process. Here at home, it's apache/apache. Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 8 hours 49 minutes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] File permitions
Maybe I wasn't clear in my previous message: What I want to do is: when you fill the form, record it to a file without 666 permitions. I mean: I don't want to have the file opened to everybody. In Perl it was possible (because it uses directly system user, which is similar to root), I want to make it possible using PHP. E.G.: The PHP-script receives the form, makes an internal authentication and creates or writes the file with 600 permitions. Thank you, Manuel Silva Quoting Alexander Skwar [EMAIL PROTECTED]: So sprach »[EMAIL PROTECTED]« am 2001-09-23 um 19:08:20 +0100 : Is there any possibility to write to files as httpd or system (which can write to files even with 000 permitions)? With 000 permissions? Is system an alias for root? If not, then it's not possible. But normally the files should only need access for the group running the webserver process. Here at home, it's apache/apache. Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 8 hours 49 minutes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] - Visite http://www.lusoweb.pt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] File permitions
im definitely not a guru, but perhaps this might help http://www.php.net/manual/en/html/function.chmod.html http://www.php.net/manual/en/html/function.chown.html those are the doc pages on usage of similar process for setting permissions (i believe) GL -- - Click here for Free Video!! http://www.gohip.com/free_video/ [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Maybe I wasn't clear in my previous message: What I want to do is: when you fill the form, record it to a file without 666 permitions. I mean: I don't want to have the file opened to everybody. In Perl it was possible (because it uses directly system user, which is similar to root), I want to make it possible using PHP. E.G.: The PHP-script receives the form, makes an internal authentication and creates or writes the file with 600 permitions. Thank you, Manuel Silva Quoting Alexander Skwar [EMAIL PROTECTED]: So sprach »[EMAIL PROTECTED]« am 2001-09-23 um 19:08:20 +0100 : Is there any possibility to write to files as httpd or system (which can write to files even with 000 permitions)? With 000 permissions? Is system an alias for root? If not, then it's not possible. But normally the files should only need access for the group running the webserver process. Here at home, it's apache/apache. Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 8 hours 49 minutes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] - Visite http://www.lusoweb.pt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] File permitions
looks pretty straightforward with php's caveat to be careful to use octal... chmod (/somedir/somefile, 0755); // octal; correct value of mode -- - Click here for Free Video!! http://www.gohip.com/free_video/ [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Maybe I wasn't clear in my previous message: What I want to do is: when you fill the form, record it to a file without 666 permitions. I mean: I don't want to have the file opened to everybody. In Perl it was possible (because it uses directly system user, which is similar to root), I want to make it possible using PHP. E.G.: The PHP-script receives the form, makes an internal authentication and creates or writes the file with 600 permitions. Thank you, Manuel Silva Quoting Alexander Skwar [EMAIL PROTECTED]: So sprach »[EMAIL PROTECTED]« am 2001-09-23 um 19:08:20 +0100 : Is there any possibility to write to files as httpd or system (which can write to files even with 000 permitions)? With 000 permissions? Is system an alias for root? If not, then it's not possible. But normally the files should only need access for the group running the webserver process. Here at home, it's apache/apache. Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 8 hours 49 minutes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] - Visite http://www.lusoweb.pt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]