Re: File Upload Security and chmod

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

 



Hi Tedd,

Yes, when I browse to www.myDomain.com I get the index.html file, and so I
have been leaving the .public_html/ directory alone since it is not my
root.  I'm curious, what you described is exactly what I'm trying to do -
what permissions do you set the parent folder at when you are finished
uploading/saving/downloading/etc.?  I have my "uploaded_images/"
directory set at chmod 0100 and I can still browse to an uploaded image from
my file upload page...  Thanks for your response,

Andy


On 9/23/06, tedd <tedd@xxxxxxxxxxxx> wrote:

At 7:19 PM -0600 9/22/06, Andy Hultgren wrote:
>For whatever reason when I ftp in using WinFtp I don't see public_html
>(it's hidden, don't know why; if I make a directory called
>".public_html" it gets created and then disappears), but I can see my
>file structure from my host's website and so I know that when I ftp in
>to myDomain.com this is what is "there":
>
>index.htm
>page1.htm
>page2.htm
>.public_html/
>images/
>etc. etc.

Andy:

Sorry, I didn't catch all of the thread, but this is my drift.

When you access your site (http://yourdomain.com) via a browser, do
you see the above index.htm?

If so, and you want to stay with that host, then leave the
.public_html/ folder alone, and build your site using WinFTP, or
whatever.

If you want to change permissions for a file from within a php
script, then ftp into your site (using ftp_login), change the parent
folder permissions, do your file thing (upload, delete, save, etc.),
and then change the parent folder permissions back and it's done.

At least that's the way I do it working on a shared host and it works for
me.

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com


[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