ExpressionEngine® Answers is a question and answer site for administrators, end users, developers and designers for ExpressionEngine® CMS. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a channel that includes a File field type. I have set two user groups to be able to upload all file types to that field. As a Super Admin I am able to upload there, but members of the other group cannot. I have set the upload directory permissions to 777 and I have confirmed that the group has permissions in EE to upload there - see attached. However, when logged in as a user of the other group, when I try to upload a PDF, I get an error that says:

The file could not be written to disk.

The file size is far less than the max file site allowed.

Normally I would think this is a directory permissions error. Any help would be appreciated for sorting this out.

enter image description here

share|improve this question
up vote 2 down vote accepted

With that error when uploading a PDF the first thing to take a look at is Admin ‣ Security and Privacy ‣ Security and Sessions and see whether "Apply XSS Filtering to Uploaded Files" is set to "yes." If it is, try setting it to "no" instead.

If that clears it up and you don't want to globally stop applying XSS filtering to uploaded files then there is a config override that will let you make only certain member group(s) exempt from the filtering. For example:

$config['xss_clean_member_group_exception'] = "6|7";

See this answer for more.

share|improve this answer
    
Hi Alex, that worked. Thank you. – fmz Apr 16 '15 at 17:19
    
You're welcome! – Alex Kendrick Apr 16 '15 at 17:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.