ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Image upload results in wrong permission (640)

September 11, 2008 5:52pm

Subscribe [2]
  • #1 / Sep 11, 2008 5:52pm

    knirketusken

    11 posts

    I have a new EE site running EE 1.6.4. When we started to test the site, my client complained that her pictures did not upload. I checked it, and discovered that the pictures my client uploaded received the permission 640. When I upload images, they get the permission 777. We are both SuperAdmins and uploaded to the same, main (default) upload folder. Using “Upload file” on the Publish page in CP. I have installed EE on many sites, but have never had this problem before.

  • #2 / Sep 11, 2008 6:37pm

    Ingmar

    29245 posts

    Just to get this clear: These are two SuperAdmins accounts, using the “file upload” feature on the very same EE installation and server, and yet the pictures get different permissions?

  • #3 / Sep 11, 2008 6:44pm

    knirketusken

    11 posts

    Yes, you got it right. Really strange…

  • #4 / Sep 12, 2008 4:16pm

    Lisa Wess

    20502 posts

    Are you running any extensions?

    Also, what build are you on? You’ll find it under the version in the footer of your control panel?

  • #5 / Sep 12, 2008 4:24pm

    knirketusken

    11 posts

    Build:  20080626. Extensions: None. I have uploaded more files today, and have noticed that it is not true after all that the two SuperAdmin accounts matter.

    I thought yesterday that from my account it got the correct permission, but it turns out that uploading files results in permission 640 also for my account. But, after resizing image, the permission is 777. (I resized yesterday without taking that into consideration when posting this).

    Som the matter is: uploaded files get the permission 640 if they are not resized.

  • #6 / Sep 12, 2008 4:28pm

    Lisa Wess

    20502 posts

    Ah, ok.  You have the same problem as here.  I’ll quote my response here in case you have questions, so that we can keep this on topic for your issue:

    ExpressionEngine, pre-1.6.4, used to chmod all uploaded files to 777.  This is because years ago, it was fairly common to see servers configured so that files uploaded via PHP would be set with the server’s default permissions, as opposed to inheriting the user or folder’s permissions.  The result of inheriting server permissions is what you see here - they become unreadable by the public and can even prevent the user (you) from modifying the via FTP.

    In 1.6.4, which was a security release, this code was removed for security reasons, and because the majority of web hosts these days have it set for files uploaded by PHP to inherit from the user or folder’s permissions - which results in readable files.

    So, in brief - at this point you will need to put in a ticket with your host explaining that files uploaded by PHP do not have public read permissions, and ask them to change this.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases