Permission folder files

David Franken's picture
David Franken
Sat, 02/20/2016 - 15:12
#1
Permission folder files

Hi,

I noticed that the there is a error displayed on the configuration page about .htaccess file.

Warning: file_put_contents(temporary:///.htaccess): failed to open stream: "DrupalTemporaryStreamWrapper::stream_open" call failed in file_create_htaccess() (line 494 of /var/www/html/drupal/includes/file.inc).

I don't exactly know that it means, i checked the file but i can't translate the location on line 494 to the real location; can you help me?

Thanks in advance!

Regards,
David

phuonght's picture
phuonght
Sun, 02/21/2016 - 22:15

Hi David,

Please set permission read, write for folder temporary : sites/default/files/temp, chmod for all folders and sub folders in sites/default/files to 755 and chmod for all files in sites/default/files to 644.

David Franken's picture
David Franken
Mon, 02/22/2016 - 04:56

Hi Phuonght,

I changed it as requested but still see this error:

sites/default/files/temp is 0666

folders and sub folders of sites/default/files is 0755

all files in sites/default/files are 0644.

Thanks again!

regards

david

phuonght's picture
phuonght
Mon, 02/22/2016 - 05:24

Please open /admin/config/media/file-system

and set permission for all folder in order drupal can read and write, especially folder Temporary directory

Image title

David Franken's picture
David Franken
Mon, 02/22/2016 - 06:57

Hi Phuonght,

It worked; i changed the locations indeed and also neede to set Execute for the Owner on the temp folder; after that; the .htaccess was created. the temp is now: 0766; is that also OK?

Thanks!

David

phuonght's picture
phuonght
Mon, 02/22/2016 - 22:12

Permission of temp is ok.

Also, we recommend some folders of Drupal as below:

- Folder sites/default/files: chmod 775
- Folder sites/default: chmod 755
- Other folder in sites/: chmod 755

  • file config of Drupal: chmode 444 (sites/default/settings.php)

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.