Concrete 5.5.1 and CHMOD Problem after upgrade

Permalink
Hi,

I have a serious problem with the newest Concrete. System was upgraded from version 5.4.2.2 to 5.5.1 this morning.

After upgrading, default file/image permissions changed 644 (when transferring images). They should be 755 like before (last week and with version 5.4.2.2.)

Is there any way to change these settings with Concrete / manually? Fresh installation is not an option (the site is HUGE with nearly 1500 pages and thousands of images) and deadlines are just around the corner... and this little problem,s causing a little bit panic here at the moment..

My clients dedicated server is hosted by OVH (http://www.ovh.com/fr/index.xml). According to the provider there has been no server patch updates this year.

 
JohntheFish replied on at Permalink Reply
JohntheFish
Do you have shell access? If so, you should be able to do a chmod recursively down that part of the directory tree.

google for linux chmod recursive to get the details.

If not, you may be able to write some php that will do the same and hack it into a cloned view of any simple block like the html block just for the purpose of running it once. That also depends on whether you have permission to do that from within the 'user' that the web server runs as.

Searching C5 for 'chmod recursive' turns up loads of results and the answer may be in one of them.
JohntheFish replied on at Permalink Reply
JohntheFish
See
http://www.concrete5.org/community/forums/customizing_c5/concrete5-...
(which is a misnomer, because 777 is not a good idea)
ollijarvinen replied on at Permalink Reply 1 Attachment
Thanks!

After reading my initial post, I see that I did not express myself quite clearly...

I succeeded to change the file permissions to correct ones afterwards manually with FTP, there is no problem. BUT...

If I or my client's staff try to add the files with concrete file manager (or via FTP), default CHMOD 644 applies.

This means that every time files or images are transferred the file permissions should be fixed by hand.

There was no help to change parent folder(s) permissions, still all files added beneath those folders appear with CHMOD 644.

Is it really so that upgrading to Concrete5.5.1 made some changes to Server/Apache settings?

safe mode is off. owner info seems to be ok...

I got this message while trying to see server configuration setting with simple php info script: UID of script "xxxxxxx.php) is smaller than min_uid... this is totally new to me.

After all, I'm just a concept and visual designer, not programmer so this is totally out of my comfort zone.
ollijarvinen replied on at Permalink Reply
**** SOLVED (?) ****

The server and operator just refused to co-operate with us.

We solved this other way and made some modifications to
updates/concrete5.x.x/concrete/helpers/concrete/file.php:

if ($createDirectories) { 
   if (!is_dir($base . '/' . $d1)) { 
      @mkdir($base . '/' . $d1, 0777, TRUE);
      chmod($base . '/' . $d1, 0755); /* added this  */
      @touch($base . '/' . $d1 . '/index.html');
      } 
   if (!is_dir($base . '/' . $d1 . '/' . $d2)) { 
      @mkdir($base . '/' . $d1 . '/' . $d2, 0777, TRUE);
      chmod($base . '/' . $d1 . '/' . $d2, 0755); /* added this */
      @touch($base . '/' . $d1 . '/' . $d2 . '/index.html');
      } 
   if (!is_dir($base . '/' . $d1 . '/' . $d2 . '/' . $d3)) { 
      @mkdir($base . '/' . $d1 . '/' . $d2 . '/' . $d3, 0777, TRUE);
      chmod($base . '/' . $d1 . '/' . $d2 . '/' . $d3, 0755); /* added this */
      @touch($base . '/' . $d1 . '/' . $d2 . '/' . $d3 . '/index.html');


Well, probably had to remember to check this out every time when upgrading, but better than nothing.
Mainio replied on at Permalink Reply
Mainio
Just move that file to your root-level dirs:
{root}/helpers/concrete/

And your changes will be intact when doing an upgrade.