Current time: 05-23-2025, 04:23 AM Hello There, Guest! (LoginRegister)


Post Reply 
PHP uploads are not readable
Author Message
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #11
RE: PHP uploads are not readable
Hi Eminos

I did some researches about this problem. The umask is set correct: 0022 but it seems that php does not set (or removes) any group and world permissions - so there's a 0077 umask hidden in the php code - or it's somewhere else - I didn't found the hideout...

I also did some tests - one on a not very old ispcp server (just a move_uploaded_file) and the same on my 2 year old suse 10 server (with mod_php, no susexec, no fastcgi). They both have 0600 permissions on a newly uploaded files.

Well, of course with mod_php apache is able to read the files (owner = apache) which is not the case with ispcp/fastcgi/suexec - there you have to chmod the newly uploaded file.

I dug deeper: the temporary file already has the 0600 permissions set.

BUT: Now I got something very strange:
If I set the upload_tmp_dir to /tmp (with open_basedir adapted) then the file *there* also has 0600 permission mode but after the use of move_uploaded_file the files has 0644 mode (on the ispcp machine).

Very strange.

So, as a temporary solution I can give you an advice: use /tmp as upload_dir for the Joomla Customers.

And hey: Typo3 does correct the permissions after an upload :-)


Maybe someone else can have a look at this behaviour of php (raphael... ???)

Have a good sunday
Joximu
11-04-2007 09:13 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
PHP uploads are not readable - Eminos - 11-03-2007, 10:48 PM
RE: PHP uploads are not readable - rbtux - 11-03-2007, 11:25 PM
RE: PHP uploads are not readable - Eminos - 11-04-2007, 12:06 AM
RE: PHP uploads are not readable - joximu - 11-03-2007, 11:57 PM
RE: PHP uploads are not readable - Eminos - 11-03-2007, 11:59 PM
RE: PHP uploads are not readable - joximu - 11-04-2007, 03:57 AM
RE: PHP uploads are not readable - Eminos - 11-04-2007, 04:07 AM
RE: PHP uploads are not readable - rbtux - 11-04-2007, 12:09 AM
RE: PHP uploads are not readable - joximu - 11-04-2007, 10:36 AM
RE: PHP uploads are not readable - Eminos - 11-04-2007, 11:49 AM
RE: PHP uploads are not readable - joximu - 11-04-2007 09:13 PM
RE: PHP uploads are not readable - joximu - 11-05-2007, 01:27 AM
RE: PHP uploads are not readable - Marcel - 11-13-2007, 06:49 AM
RE: PHP uploads are not readable - BeNe - 11-13-2007, 06:54 AM
RE: PHP uploads are not readable - rbtux - 11-13-2007, 06:55 AM
RE: PHP uploads are not readable - Marcel - 12-09-2007, 02:16 AM
RE: PHP uploads are not readable - RatS - 12-09-2007, 04:55 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)