You are here: upload and file permissions « All PHP « IT news, forums, messages
upload and file permissions

Posted by kkadrese on 02/16/07 09:16

Hello group,

I'm implementing file upload in webpage. And got stuck with file
permissions. An uploaded file gets 0600 and as such cannot be shown in
the webpage, as far as I understand it needs at least 0644.

So I did a little investigation and found:
1) the upload folder has 0755, set by hand.
2) echo `umask` in the upload folder and actually in the higher levels
of the webserver folders gives 0022.
3) a file created by fopen in php file called via webserver gets 0644,
in the upload folder.
4) and, as already said, uploaded file gets 0600.

Where did that 0022 (Group,Other: Write) appear from? Is it right for
the webserver?
How to upload file with 0644 permissions?


Andra.

 

Navigation:

[Reply to this 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

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