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

XF 1.1 attachments upload error

Discussion in 'Troubleshooting and Problems' started by xmlxp, Mar 2, 2012.

  1. xmlxp

    xmlxp Active Member

    I moved internal_data and data folders to 2nd hard drive and synlink both foldres inside www directory , both folders have permissions 777, i added to config.php the following lines:

    $config['internalDataPath'] = '../internal_data';
    $config['externalDataPath'] = '../data';
    $config['externalDataUrl'] = '../data';

    now i cant upload attachments and i get this error in the server error log:
    Code:
    ErrorException: move_uploaded_file(/home/vbcom/public_html/community/../internal_data/attachments/179/179887-ffdcc42a6649b714759489d7beec19bf.data) [<a href='function.move-uploaded-file'>function.move-uploaded-file</a>]: failed to open stream: Permission denied - library/XenForo/DataWriter/AttachmentData.php:203
    
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Ensure all sub-directories are also 0777.
     
  3. xmlxp

    xmlxp Active Member

    seems only the main directories internal_data and data got permissions of 777 but the subdirectories are 755

    i thought chown -R 777 internal_data will set permissions to 777 also for subdirectories!!

    whats the commandline to set also the subdirectories to 777?
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Use chmod.

    You need to do both though.

    Code:
    chmod -R 777 data
     
    chmod -R 777 internal_data
     
  5. xmlxp

    xmlxp Active Member

    yes that fixed the problem

    thank you Borgan (y)
     
  6. shawn

    shawn Well-Known Member

    Check to see who owns them now... probably a non-existent user w/UID '777'

    I typically chown them to root:webgroup or webserver:webgroup, and then set permissions to 755, 775, 744, etc. It's not a huge security issue, but I prefer to go with the minimum possible permissions.
     

Share This Page