Reply to Re: Writing to files that are not public

Your name:

Reply:


Posted by Mike Russell on 03/08/07 13:35

"Efi Merdler" <fooshm@gmail.com> wrote in message
news:1173359035.920958.14900@n33g2000cwc.googlegroups.com...
> Hi,
> I'm running a script that reads and writes to a file.
> The problem is that in order to read and write to this file I need to
> set the public permission to read and write.
>
> As understand the reason is that the script is running with apache
> id,however the file (which I uploaded using an FTP) has a different
> group and user id.
>
> First of all am I right? is this reason, is there a way to solve this
> problem (I do not have a ssh connection to my server, so I can't
> change the id).

Use FTP to turn on all permissions for the file, or create the file in php.

It seems to me that you should consider whether a database may be a cleaner
solution than a file. In addition to the permissions issue you've already
discovered, there is locking. Have you considered what happens when two
sessions need to access the file at the same time? These sorts of issues
are already dealt with if you use a database.

BTW - you may want to post this to alt.php for more answers, as this is not
really a php language issue.
--
Mike Russell
www.curvemeister.com/forum/

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация