Icy Phoenix
Old Support Topics - Uploaded Images Have 600 Instead Of 644
tiolalu [ Mon 12 Nov, 2007 23:46 ]
Post subject: Uploaded Images Have 600 Instead Of 644
I don't really know why, I think there is a failure than the configuration of the server. It had happend when I change to a new server. All images you upload have permisions 600 so anyone can see the image.
Where do you think is the failure?
There is any way to put in the uploas script to give to the file permisions 644?
There is any way to do it through cronjobs?
TIA!!
tiolalu [ Fri 16 Nov, 2007 07:27 ]
Post subject: Re: Uploaded Images Have 600 Instead Of 644
I have already done the cronjob, so each 15 minutes the system done the permisions to all files in folder, but not yet solved the problem

.
novice programmer [ Fri 16 Nov, 2007 15:13 ]
Post subject: Re: Uploaded Images Have 600 Instead Of 644
What server do you use?
tiolalu [ Sat 17 Nov, 2007 13:52 ]
Post subject: Re: Uploaded Images Have 600 Instead Of 644
cPanel, but the same forum have been working in Plesk, another cPanel, HSphere, and another cPanel, but in the last one it don't work.
casimedicos [ Sun 18 Nov, 2007 16:03 ]
Post subject: Error 600 Images
tiolalu [ Mon 19 Nov, 2007 17:44 ]
Post subject: Re: Uploaded Images Have 600 Instead Of 644
casimedicos, thanks, I have repported it.
(I don't know when I could test it because my web is under DDOS attack since friday

.
tiolalu [ Fri 23 Nov, 2007 23:17 ]
Post subject: Re: Uploaded Images Have 600 Instead Of 644
casimedicos, thanks! I'm still under atack

.
I have changed the server and it works again... In the old server I have "fix" the problem with a cronjob.
Thanks anyway!!

.
Mighty Gorgon [ Wed 28 Nov, 2007 10:36 ]
Post subject: Re: Uploaded Images Have 600 Instead Of 644
I don't really know why, I think there is a failure than the configuration of the server. It had happend when I change to a new server. All images you upload have permisions 600 so anyone can see the image.
Where do you think is the failure?
There is any way to put in the uploas script to give to the file permisions 644?
There is any way to do it through cronjobs?
TIA!!
What feature are you use to upload images?
You can change CHMOD via PHP if your server allows it.
tiolalu [ Fri 30 Nov, 2007 01:34 ]
Post subject: Re: Uploaded Images Have 600 Instead Of 644
Mighty Gorgon, I use the little button that you can unable to upload images into the server.
Now is working fine (in the new server)
Rene [ Mon 07 Jan, 2008 14:59 ]
Post subject: Re: Uploaded Images Have 600 Instead Of 644
I don't really know why, I think there is a failure than the configuration of the server. It had happend when I change to a new server. All images you upload have permisions 600 so anyone can see the image.
Where do you think is the failure?
There is any way to put in the uploas script to give to the file permisions 644?
There is any way to do it through cronjobs?
TIA!!
What feature are you use to upload images?
You can change CHMOD via PHP if your server allows it.
Hi, can you tell me how to change the chmod in the upload.php? I think I've the same problem.
I already take a look in the upload.php but there's no chmod...
KugeLSichA [ Mon 07 Jan, 2008 15:34 ]
Post subject: Re: Uploaded Images Have 600 Instead Of 644
yes...same problem for me too..
all files in posted_images have CHMOD 600
maybe luca have some solution
Rene [ Wed 09 Jan, 2008 11:35 ]
Post subject: Re: Uploaded Images Have 600 Instead Of 644
I found a solution which works for me.
OPEN
upload.php (in forum root directory)
FIND
$file_size = $_FILES['userfile']['size'];
AFTER ADD
chmod($filename_tmp,0644);
KugeLSichA [ Thu 10 Jan, 2008 19:10 ]
Post subject: Re: Uploaded Images Have 600 Instead Of 644
great work Rene...
Thanks !
p.s.:topic sticky!
KugeLSichA [ Fri 11 Jan, 2008 07:39 ]
Post subject: Re: Uploaded Images Have 600 Instead Of 644
Hi,
Luca told me that you dont need to add this in the new RC3.
In this release this error is fixed.
If you did an update from an older RC to the newest and want to change the chmod automaticly, please take a look into the install/contrib folder, where you find a file which is called
reset_permissions.php
open that file, and there you find a line
$dir = 'files/album/otf/';
change it to whatever you need to change permissions to 0755, and then launch it from your root
Rene [ Fri 11 Jan, 2008 11:41 ]
Post subject: Re: Uploaded Images Have 600 Instead Of 644
Hi,
Luca told me that you dont need to add this in the new RC3.
In this release this error is fixed.
If you did an update from an older RC to the newest and want to change the chmod automaticly, please take a look into the install/contrib folder, where you find a file which is called
reset_permissions.php
open that file, and there you find a line
$dir = 'files/album/otf/';
change it to whatever you need to change permissions to 0755, and then launch it from your root
Ok thanks for this info. Will the permission change to 755 every time I upload a file or is it only to change once the permission of a folder?
KugeLSichA [ Fri 11 Jan, 2008 14:28 ]
Post subject: Re: Uploaded Images Have 600 Instead Of 644
Sorry i forgot to say one thing... delete this file after you changed the permission...
This is only need for pictures which have been uploaded with the RC2. in RC3 you dont need this file.
@Rene
it changes the permission for all file which are in the specified folder... if you have more folder to change, you must edit the reset_permissions.php for every file... after that delete this file.
Rene [ Fri 11 Jan, 2008 15:00 ]
Post subject: Re: Uploaded Images Have 600 Instead Of 644
@Rene
it changes the permission for all file which are in the specified folder... if you have more folder to change, you must edit the reset_permissions.php for every file... after that delete this file.
But when I delete this file it means for me that the permission are only changed for one time (at the time at executing the reset_permissions.php) and not every time a user uploads a picture to my site.
EDIT: I took a look to the reset_permission.php of RC3 and the code only changes the permissions one time. So you have to execute this file every time a user uploads.
EDIT2: It seems to be fixed in the new RC in file upload.php. There's a line with chmod(0777) and that would be the right way

KugeLSichA [ Fri 11 Jan, 2008 16:46 ]
Post subject: Re: Uploaded Images Have 600 Instead Of 644
...
This is only need for pictures which have been uploaded with the RC2. in RC3 you dont need this file.
...
