I am now getting this error "The directory /tmp/views_plugin_display is not writable, because it does not have the correct permissions set."

I was using the 6.x Beta and it was working fine, then went to run a report and I get this error and the export is blank. I rebuilt the permissions, I verified that the /tmp directory is there, I even created the views_plugin_display in both the root directory and in the default/files/tmp/ directory to no avail.

stumped?

Any help would be greatly appreciated.

Comments

joaomachado’s picture

I also verified the permissions are set to 755

ben coleman’s picture

I ran into this when using views_data_export on two different sites running on the same machine. The message came up when running an export on the second site. In my case, each site runs as a different user. At the time, I had the Drupal temporary directory set to the default of /tmp. The first site created /tmp/views_plugin_display fine. The second tried, but failed because the directory was already there, and was owned by the first user (and was only writable by the first user). I fixed this by giving each site its own temp directory, and changing the Drupal temporary directory to point to the appropriate temp directory for each site.

When Drupal runs, what user does it run as? Your user, or a user for the web server?

dpearcefl’s picture

I hit the exact sample issue, Ben.

My understanding is that any files or folders created in the "temp" folder should be always be uniquely named. So maybe:

$dir = file_directory_temp() . '/views_plugin_display';

should be changed to:

$dir = file_directory_temp();

This would create a unique filename in the "temp" folder.

dpearcefl’s picture

The other answer is to use a site specific "Temporary directory" listed under admin/settings/file-system.

dpearcefl’s picture

Status: Active » Closed (works as designed)

The more I think about this, the more I think that using a site-specific "Temp" folder is the correct way to go.

Since the original poster has not responded in a while, I'm going to close this issue.