What are the CMOD Permissions of folders inside data and internal_data?

DRE

Well-known member
I recently transferred hosts. Got an error when trying to upload a video to the member gallery. It did not save the screenshot. Does that mean the permissions for the media folder in the data folder is wrong? Right now its set to CMOD 755 I have no idea what it was like before the site was migrated over but I can say that the data and the internal_data folders was 755 instead of CMOD 777 as they are supposed to be after the site transfer. Is that a server issue? Problem is that I don't know which folders were CMOD to 777 INSIDE the data and internal_data folder.

Okay I did an experiment and copied my data folder from the previous server to a subfolder on this site and it automatically turned all the data internal_data folders to 755.

This is the error I got when uploading a video.


imagejpeg(/home/user/public_html/data/media/470.jpg): failed to open stream: Permission denied

XenForo_Application::handlePhpError()
imagejpeg() in XenForo/Image/Gd.php at line 208
XenForo_Image_Gd->output() in EWRmedio/Model/Thumbs.php at line 45
EWRmedio_Model_Thumbs->buildThumb() in EWRmedio/Model/Media.php at line 193
EWRmedio_Model_Media->updateMedia() in EWRmedio/ControllerPublic/Media.php at line 183
EWRmedio_ControllerPublic_Media->actionSubmit() in XenForo/FrontController.php at line 310
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
XenForo_FrontController->run() in /home/user/public_html/index.php at line 13
imagejpeg(/home/user/public_html/data/media/470.jpg): failed to open stream: Permission denied
 
K this is unrelated to my issue but I think I found the answer.

Check the permissions for data and internal_data. Both directories and their contents need to be writable (chmod 777).

Also, what image library are you using?

Admin CP -> Home -> Options -> Attachments -> Default Image Processor

Try a different library if available.

Maybe there is a permission problem inside of those directories. If you have shell access then try running these commands to recursively set permissions in those directories:

Code:
chmod -R 777 data
 
chmod -R 777 internal_data

You might also try 755 permissions. Depending on how PHP is installed, 755 may still be writable. I have seen some server configurations throw errors with 777.

What about avatars? When you upload an avatar does it successfully generate the different sizes? That's another way to test that your image library is working.

That indicates a lack of permissions on the server. Make sure data and internal_data are writable, including all subdirectories.
 
I'd have thought on shared hosting you'd be able to run with 755 permissions.

Just set the whole data/ internal_data/ to 777 as per the above message you quoted.
 
It could be that the directory 'owner' changed from Apache to root or 8thos, etc. Check who owns (or wrote) the files/directories as compared to what they were before.
 
I have my forum in debug and I see this error when I go to the random thoughts thread on my site.

Template Errors: thread_view

  1. Illegal string offset 'thumbnailUrl' in /home/user/public_html/internal_data/templates/S.91,L.1,thread_view.php, line 2220
  2. Illegal string offset 'thumbnailUrl' in /home/user/public_html/internal_data/templates/S.91,L.1,thread_view.php, line 2224
  3. Illegal string offset 'filename' in /home/user/public_html/internal_data/templates/S.91,L.1,thread_view.php, line 2239
  4. Illegal string offset 'filename' in /home/user/public_html/internal_data/templates/S.91,L.1,thread_view.php, line 2247
 
Aight so I opened up FileZilla, clicked on data and chose the option 'Set all files and folders within data to 777'. Will do the same for internal_data next. I'll let you know how it goes.
 
I have my forum in debug and I see this error when I go to the random thoughts thread on my site.

Template Errors: thread_view

  1. Illegal string offset 'thumbnailUrl' in /home/user/public_html/internal_data/templates/S.91,L.1,thread_view.php, line 2220
  2. Illegal string offset 'thumbnailUrl' in /home/user/public_html/internal_data/templates/S.91,L.1,thread_view.php, line 2224
  3. Illegal string offset 'filename' in /home/user/public_html/internal_data/templates/S.91,L.1,thread_view.php, line 2239
  4. Illegal string offset 'filename' in /home/user/public_html/internal_data/templates/S.91,L.1,thread_view.php, line 2247

This is normal as it's an XF error from recent php versions. You only see it in thread view and it's a confirmed bug (XF) since over a year ago.

Be careful with CHMOD 777, anyting you make 'world writable' is a security concern. I try to scale all of my directory and file permissions down until they stop working...
 
This is normal as it an XF error from recent php versions. You only see it in thread view and it's a confirmed bug (XF) since over a year ago.

Be careful with CHMOD 777, anyting you make 'world writable' is a security concern. I try to scale all of my directory and file permissions down until they stop working...
Thanks that's really good advice. I never got that error on my old host. I'm not sure if they were on php 5.2 or 5.3.

Anyway, after I did what I did, my thumbnails showed up fine so I'll just restore an old backup of my data and internal_data folders and only make 777 the data, internal_data and media folder and leave the other folders as they were (755 or 644 or whatever).
 
I have my forum in debug and I see this error when I go to the random thoughts thread on my site.

Template Errors: thread_view

  1. Illegal string offset 'thumbnailUrl' in /home/user/public_html/internal_data/templates/S.91,L.1,thread_view.php, line 2220
  2. Illegal string offset 'thumbnailUrl' in /home/user/public_html/internal_data/templates/S.91,L.1,thread_view.php, line 2224
  3. Illegal string offset 'filename' in /home/user/public_html/internal_data/templates/S.91,L.1,thread_view.php, line 2239
  4. Illegal string offset 'filename' in /home/user/public_html/internal_data/templates/S.91,L.1,thread_view.php, line 2247
This is normal as it's an XF error from recent php versions. You only see it in thread view and it's a confirmed bug (XF) since over a year ago.

Be careful with CHMOD 777, anyting you make 'world writable' is a security concern. I try to scale all of my directory and file permissions down until they stop working...
Once again thanks for the great advice. Here is the fix that Mike Edge from http://xfhost.me provided http://xenforo.com/community/threads/php-5-3-end-of-life.42615/#post-468690

There is a bug only in 5.4 that threads give a error above the header..
Template Errors: thread_view

Illegal string offset 'thumbnailUrl' in

It is only viewable to admins though and only appears in debug.

Going into template - attachment_editor

and removing

<xen:set var="$attachment"></xen:set>

fixes it
 
Back
Top Bottom