1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Troubleshooting and Problems' started by DRE, Feb 3, 2013.

  1. DRE

    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
     
  2. DRE

    DRE Well-Known Member

    K this is unrelated to my issue but I think I found the answer.

     
  3. MattW

    MattW Well-Known Member

    Depends how your new host is running the server and what user permissions you have. Is it shared hosting you are using?
     
  4. DRE

    DRE Well-Known Member

    Yeah.
     
  5. MattW

    MattW Well-Known Member

    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.
     
  6. melbo

    melbo Well-Known Member

    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.
     
  7. DRE

    DRE Well-Known Member

    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
     
  8. DRE

    DRE Well-Known Member

    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.
     
  9. melbo

    melbo Well-Known Member

    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...
     
    8thos likes this.
  10. DRE

    DRE Well-Known Member

    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).
     
  11. melbo

    melbo Well-Known Member

    Good deal. Glad you got it sorted
     
  12. DRE

    DRE Well-Known Member

    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

     
    Jake Bunce and The Forum Heroes like this.
  13. DRE

    DRE Well-Known Member

    Alright I had to CMOD all data and internal_data subdirectories to 777 BUT...

    I had to uninstall and remove QQFarm from my site as a result since I wasn't sure what the permissions needed. I will reinstall it later since I'm not done translating it from Vietnamese to English anyway. Read more about QQFarm here if your curious: http://xenforo.com/community/threads/qqfarm-english-translation-development-log.41076/

    So far so good.
     

Share This Page