Re: create file permission problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, June 13, 2007 12:13 pm, tedd wrote:
> If I want to save data in a file, I can ftpconnect(); change the
> permissions of an existing file from 0755 to 0777; write to the file;
> and change the permissions of the file back to 0755 -- no problem.

On 6/13/07, Richard Lynch <ceo@xxxxxxxxx> wrote:
When your script creates the file, it creates it as itself, and not as
'you', which means that 'you' probably can't change it.

   Rich,

   If he's doing it with ftpconnect();, it's a matter of the login
information supplied for the socket connection via the function, not
who the script is running as.  However, on a slightly different note,
you can (once again, referring to my post from the archives) `chmod
6755 scriptname.php` where scriptname.php is the name of the file
creating the file, if on the same (*nix-like) server as the files
being created.  If the server is set up properly, then chmod'ing it
like that sets the first permission bit to execute the script as the
user and group (with inherent permissions), as opposed to running as
`nobody`, `apache`, `httpd`, `daemon`, or *gulp!* `root`.

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux