PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sun Oct 20, 2019 6:24 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Wed May 14, 2008 1:02 am 
Offline
Forum Newbie

Joined: Wed May 14, 2008 12:54 am
Posts: 3
Hi all,

I noticed that if I create an image using the function imagejpeg/imagepng the permissions of such file are always set to 600.
This is in most cases no problem if the Apache and PHP are running from the same user (Apache) but on several server (CGI ??) this files are no more readable.
All other files created or copied from PHP or Apache are always 644 (standard umask 22 I guess), so why the files created from php-gd having other permissions?
Is there any way to change it?

Kind regards and thanks in advance,
Neo


Top
 Profile  
 
PostPosted: Wed May 14, 2008 2:26 am 
Offline
Jedi Mod
User avatar

Joined: Tue Dec 21, 2004 6:03 pm
Posts: 5263
Location: usrlab.com
Use chmod() after you generate the image.


Top
 Profile  
 
PostPosted: Wed May 14, 2008 2:44 am 
Offline
Forum Newbie

Joined: Wed May 14, 2008 12:54 am
Posts: 3
Yes I know that this is the possible solution but I don't like use chmod.
It causing sometimes problems if the server has some security add ons, especially if it is not right configured.
I just wondering why 600 ?
The standard created files under Linux are always 666 and the standard umask is 0022 so the new created file should have 644 and not 600.
Or am I wrong?

Best regards,
Neo


Top
 Profile  
 
PostPosted: Wed May 14, 2008 4:03 am 
Offline
Forum Newbie

Joined: Wed May 14, 2008 12:54 am
Posts: 3
an other question: are the files created from php-gd always sets 600 or it is not normal?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group