• 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

xmlxp

Active member
#1
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
 

xmlxp

Active member
#3
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?
 

shawn

Well-known member
#6
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.