Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 04:08:34 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155542 Posts in 21714 Topics by 7736 Members
Latest Member: chris85
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: chmod for user images folders  (Read 201 times)
PurpleEdge

Offline Offline

Posts: 232



WWW
« on: March 28, 2011, 11:58:39 PM »

I have a file upload process for end users. It creates an image and thumbnail folder.

What is the best practise for setting permissions for these folders? I can change permissions at any stage of the upload process. Should I turn-off write access when the upload is complete?

Logged
Ruud
WebsiteBaker Org e.V.

Offline Offline

Posts: 2297



WWW
« Reply #1 on: March 29, 2011, 09:35:14 AM »

When you upload through the webserver, the webserver (WB) is the owner.

Now it depends on what you want to protect.
Protection against hackers? If they have some kind of access to your server/php environment they can reset the permissions to whatever they want.
If it is to prevent overwriting by others you could set write-access off, but I would do the overwrite testing in my script (maybe it should be overwritten at some time?).

So I would probably use the "default" 755/644 (or whatever is best for your server setup) permissions for something like this.
Logged

Professional WebsiteBaker Solutions
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!