Hello,
I have been googling this error that I see and I've tried some "fixes" that were suggested and in many other places this error is listed in a forum topic but there is no resolution as to how to fix the problem. I keep seeing this error:
Warning: file_put_contents(private:///.htaccess) [function.file-put-contents]: failed to open stream: "DrupalPrivateStreamWrapper::stream_open" call failed in file_create_htaccess() (line 502 of /home/topten/public_html/includes/file.inc).
Most of the posts that ask about this error are very old and they point out that for them the error only occurs when they do such and such and/or it prevents them from displaying any content (or prevents drupal from displaying any content) or the error doesn't let them save the article/page/etc. My problem is that I see this all the time and it is not limited to any particular action.
Has anyone seen this? Any suggestions on how to fix the problem?
Thanks,
Bruce
Comments
Migrate Issue
Same issue. For me it's happening when using the Migrate module on D7
I have come across this issue
I have come across this issue quite a few times while using the Migrate Module on Drupal 7. It really boils down to permission issues. Drupal is trying to access/write to the private folder but it can't. So make sure the directories are set correctly on your drupal admin (/admin/config/media/file-system). Check if the private directory permissions are set correctly. For testing purposes change the private folder permission to 777. If that works, then you'll know.
A possible solution
I had the same problem, but the error disappeared after checking the "Status report" (/admin/reports/status) and fixing the paths in /admin/config/media/file-system . This happened after moving the website to a different hosting.
Hope this helps!
@realwahl - thanks that did
@realwahl - thanks that did the trick for me after rsyncing from remote host to local server.
In my case this warning was
In my case this warning was caused simply by the absence of appropriate directory which is indicated in admin/config/media/file-system under Private file system path
In my case, as best I can tell, this warning was from
In my case, as best I can tell, this warning was from
my having a space (a blank-space character)
at the end of my specified path in the text-field box for
'Private file system path' at the configuration page:
(my-d7-root)/admin/config/media/file-system
Private file system path
>[sites/default/files/private ]<
---
Note: My experience earlier today for all of the seven sites
I updated from d7.23 to d7.24, and after seeing security warnings
about the .htaccess files associated with the folders specified
on the my-d7-root/admin/config/media/file-system configuration page...
... the system in every case would automatically create any missing folders,
but also created any missing .htaccess files.
The simple security solution was for me to delete each .htaccess file,
and simply refresh the (my-d7-root)/admin/config/media/file-system configuration page
(although the button 'Save configuration' worked as well).
My error, of course, was that I accidentally typed a space in the text-field box
following the path I newly specified for the private file path
for one of the sites.
All the best; intended.
-Chris (great-grandpa.com)
___
"The number one stated objective for Drupal is improving usability." ~Dries Buytaert *
Check to make sure that your
Check to make sure that your private and tmp file folders are correctly set.
http://SocialNicheGuru.com
Delivering inSITE(TM), we empower you to deliver the right product and the right message to the right NICHE at the right time across all product, marketing, and sales channels.
filesystem permission issue?
filesystem permission issue? check permission and owner of /files folder
Missing folder name in admin/config/media/file-system
If you are missing a folder name in the admin/config/media/file-system field, you will get this error. Can also be line 496 of includes/file.inc
Hello,
Hello,
same problem here.
In my case the solution was change my private folder permissions. It was configured to read only and the owner was www-data user. I changed the permissions and the owner user and everything worked fine.