Drupal 8.2.6
Media Entity 8.x-1.0-alpha4
Ctools 8.x-3.0-alpha27
So after turn on CSS/JS aggregation I noticed that I can not upload images anymore. When I try to upload an image it gave me an error. So I changed my tmp directory to
sites/default/files/tmp
but that didn't help and gave me an error of
The file could not be saved. An unknown error has occurred.
File upload error. Could not move uploaded file.
This value should not be null.
I checked the permissions. default folder is 755. files folder is 755. tmp folder is 755. This also started affecting my Drupal 7 website after I enabled aggregation, so I am certain this is what is affecting my site.
Any information or leads would be very helpful, as I've been stuck.
After a long 2 days struggling to find the answer, I finally found a temporary solution. I used the command chmod -R 1777 /tmp . Then in admin/config/media/file-system I set directory to /tmp . Might have security vulnerabilities, but it works for me.
Related
To solve these issues display in process of installing Drupal as:
Go to your "drupal" folder and make permission 777
Then open "sites" folder and make it 777
Choose "default" folder and make it 777
Open "files" and choose "setting.php" to change permission to 777
You are giving public right to execute read and write files in your directories. Clearly not a good idea.
Check this link for more infos on what to do in production environnement (it also explains basic chmod values wich you seem to not be understanding) : https://www.drupal.org/node/244924
Some normal permissions would be 0644 for files and 0755 for directories. Then i.e. settings.php since there is no need for it to be writable you should fully forbid writing.
If only 0777 "solves" your issue, maybe problem are not permission values but file owner. It happens that you upload files with one (FTP) account Apache is running website with some other, which is not allowed to write over first one. So changing file owner could solve the issue.
There is a site where I get this type of error
Error creating the folder wp-content/uploads/noisy. Please create it manually and set the permission to 777 through your FTP client.
In ftp part I changed the file permissions to 777 but error is still running. Also I delete this folder but anyway I get this error.
I have solved in at least.
I have added this line to config.php define('UPLOADS', '/wp-content/uploads');
All is fine!
Please try the following:
Go to Settings->Media and unchecked the box that says "Organize my uploads into month- and year-based folders". This solves your problem.
I keep getting the error on my Drupal 7 site - even after I have configured the logging and errrors to 'none'
I have made my tmp file writeable 777 and checked the file directory is correct under 'file system' I have made my sites/default/files directory writeable also
Cannot seem to get rid of this error - it reads:
The specified file temporary://fileg2e71m could not be copied, because the destination directory is not properly configured. This may be caused by a problem with file or directory permissions. More information is available in the system log.
Any suggestions?
Have resolved the issue:
It was an ownership issue where the files are owned by the Apache user. I Set PHP 5 to run in cgi-mode on my cPanel.
Drupal 7 and drupal 8 and 9:
After importing a Database, some paths are not quite well defined. Go to /admin/config/media/file-system and hit "Save Configuration". Now the Translations-import works fine.
After mysteriously losing site administrator access to my wordpress installation, I tried uploading the theme into the wp-content/themes folder directly.
However, I get the following error when attempting to access the main page now
{"success":"-1","alert":"Cannot write style-custom.css file, you may try setting the style-custom.css file permission to 755 or 777 to solved this. ( If file does not exists, you have to create it yourself )"}
How can I solve this?
Thanks
I have the same problem with the bluediamond themes.
To fix this issue I have changed by FTP the permissions on the file style-custom.css (The correct permissions is 777) locate in the root of the theme "wp-content/themes/bluediamond".
I'm having a problem when trying to update WordPress to the latest version I get the following error:
Download failed.: Destination directory for file streaming does not exist or is not writable.
Installation Failed
I'm also having the same problem when uploading images, it fails and gives the following error
has failed to upload due to an error
The uploaded file could not be moved to "the website path and then uploads directory"
I have checked the permissions of the folders and the folders themselves are set to 755 & the files inside them set to 644.
Could anyone tell me why it would be doing this?
Where running a plesk server.
Thank You,
Mark
Are there any more error messages, probably also in the servers log files? Probably the download for the update should be done to /tmp and you are not allowed to store files there? Try setting the constant WP_TEMP_DIR which should change the directory. Put something like this in your wp_config.php:
define('WP_TEMP_DIR', ABSPATH . 'wp-content/');
The permissions you're using seem reasonable, but they will only work if the FTP user that WordPress is using (set in your wp_config.php file) is the same as the owner of those files/folders.