Re: [PHP-DB] www-data file
What are you trying to achieve? Or to put it more clearly, why do you need the filw owner to be ethan? Jasper Verstuurd vanaf mijn iPad Op 26 aug. 2014 om 06:20 heeft Ethan Rosenberg erosenb...@hygeiabiomedical.com het volgende geschreven: Dear list - When I use fopen, the file owner and group are both www-data. How can I ensure that the owner and group will be ethan? TIA Ethan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] www-data file
On Tue, Aug 26, 2014 at 12:20 AM, Ethan Rosenberg erosenb...@hygeiabiomedical.com wrote: Dear list - When I use fopen, the file owner and group are both www-data. How can I ensure that the owner and group will be ethan? TIA Ethan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Use chown/chgrp after the fact: http://php.net/manual/en/function.chown.php http://php.net/manual/en/function.chgrp.php If you want it to be ethan by default, something which I would never do or recommend to do for obvious security reasons you will need to modify your Apache environment variables (find where the configs are set by using grep, for example: grep www- /etc/apache2/apache2.conf).
Re: [PHP-DB] www-data file
On Aug 25, 2014, at 11:20 PM, Ethan Rosenberg erosenb...@hygeiabiomedical.com wrote: Dear list - When I use fopen, the file owner and group are both www-data. How can I ensure that the owner and group will be ethan? TIA Ethan Are we talking about file permissions? Best, Karl DeSaulniers Design Drumm http://designdrumm.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] www-data file
Another, safer, thing to consider would be setting a sticky bit on whatever directory the files will be in: http://computernetworkingnotes.com/managing-file-system-security/sticky-bit.html I've used sticky bits in a number of situations with multiple groups and users co-habiting environments quite nicely in the past. You'll find that simply chowning from inside php won't always work, depending on how your groups are setup. If it will be just one file (rather than an unlimited number of them created by the server), simply chown it to ethan manually, once. -matt On Aug 25, 2014 9:43 PM, Aziz Saleh azizsa...@gmail.com wrote: On Tue, Aug 26, 2014 at 12:20 AM, Ethan Rosenberg erosenb...@hygeiabiomedical.com wrote: Dear list - When I use fopen, the file owner and group are both www-data. How can I ensure that the owner and group will be ethan? TIA Ethan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Use chown/chgrp after the fact: http://php.net/manual/en/function.chown.php http://php.net/manual/en/function.chgrp.php If you want it to be ethan by default, something which I would never do or recommend to do for obvious security reasons you will need to modify your Apache environment variables (find where the configs are set by using grep, for example: grep www- /etc/apache2/apache2.conf).