Images and permissions [message #10942] |
Fri, 13 June 2003 23:22 |
Victor_M
Messages: 51 Registered: January 2003 Location: NJ, USA
Karma: 0
|
Member |
|
|
Sorry for asking this question again, but even after going from FUD 2.3.6 to 2.3.8, and moving to another webhost, I still have the same problem.
The problem is that all images written to or updated in folders under the /images folder are written with a permission of 600.
MySQL Version: 4.0.12
PHP Version: 4.3.1
Any ideas?
|
|
|
|
Re: Images and permissions [message #10951 is a reply to message #10944] |
Sat, 14 June 2003 06:28 |
Victor_M
Messages: 51 Registered: January 2003 Location: NJ, USA
Karma: 0
|
Member |
|
|
That's what I've been doing for smileys and avatars that we added. But custom_avatars submitted by members can not be seen unless we manually chmod them to 644. As you can imagine, that's quite tedious.
My question really is, why aren't the image files being written as 644 when those files are created? What do I have to do to make sure they are written as 644?
I don't know enough about PHP and Unix, but it would seem to me that I should be able to force the files to be written with the permission needed to be viewed in the forum.
[Updated on: Sat, 14 June 2003 06:28] Report message to a moderator
|
|
|
Re: Images and permissions [message #10960 is a reply to message #10951] |
Sat, 14 June 2003 14:54 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Fair question, so let me explain:
When the files are created their owner is the webserver, so 0600 permission is sufficient for the forum to access these files. If you unlock the forum then new files will be created with a 0666 permission allowing anyone to read/write to those files (not very secure).
To make your job go faster if you have many avatars, write a simple php script that will go through all the files in the directory and chmod them.
FUDforum Core Developer
|
|
|
Re: Images and permissions [message #11005 is a reply to message #10960] |
Mon, 16 June 2003 16:44 |
Victor_M
Messages: 51 Registered: January 2003 Location: NJ, USA
Karma: 0
|
Member |
|
|
Maybe I'm not explaining myself well. In any case, let me make one last attempt, and then I promise I'll drop this.
FUD built a feature whereby any forum member can go to their profile and upload a picture (avatar). That picture gets written to the /images/custom_avatar directory with that forum member's assigned number as the file name. In our case, that file is being written with a permission of 600. This permission does not allow that avatar to be viewed by any forum member.
This situation isn't limited to custom avatars. For whatever reason, all images added using FUD programs are written as 600. That includes smileys, avatars, custom_avatars.
Clearly, that can't be your intention to offer those features but require Admins to chmod each and every file to 644. And I know for a fact this used to work just fine. I'm also sure you'd have heard from other people besides me if they had to go into the File Manager to chmod every image added.
What could it be about my environment that's causing this?
For your information, once again we re-installed FUD forum 2.3.8 from scratch. The rest of the environment at our webhost is:
Operating System: Linux
Apache Version: 1.3.27 (Unix)
PHP Version: 4.3.1
Mysql Version: 4.0.12
Even if you don't have an answer, I appreciate your effort.
Thanks
|
|
|
Re: Images and permissions [message #11011 is a reply to message #11005] |
Mon, 16 June 2003 18:10 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Let me explain again, when a forum creates a file it does so with the 0600 (if locked) and 0666 (if unlocked). However, the group/user that the file is created with is the webserver's uid/gid. This means that no matter the permission the webserver should always be able to access the files it created.
If you the file loc/unlock control panel you can quickly chmod all files 0600 (lock) or 0666 (unlock) with virtually a single click.
FUDforum Core Developer
|
|
|
|