Question

Possible Duplicate:
Is setting the uploads folder 777 permision secure?

I am using WordPress on my new host, and when I try to install a plugin I get this;

Warning: touch() [function.touch]: SAFE MODE Restriction in effect. The script whose uid is 10026 is not allowed to access /tmp owned by uid 0 in /var/www/vhosts/vanillalooks.net/httpdocs/wp-admin/includes/file.php on line 177

Warning: unlink() [function.unlink]: SAFE MODE Restriction in effect. The script whose uid is 10026 is not allowed to access /tmp owned by uid 0 in /var/www/vhosts/vanillalooks.net/httpdocs/wp-admin/includes/file.php on line 489

I asked my hosting provider if they could fix it, and they said they would disable the PHP safe mode, and so I guess they did, but it's still not working. They now have no idea how to fix it, and I'm still getting this error.

Why does WordPress still think it's on safe mode? And how can I check if it's still on safe mode or not? I'm using Plex. Do I need to reinstall WordPress or something?

Also, I had a problem with my uploads folder; WordPress could not get access to it. So I set the folder permissions to 777, and it now works, but is this a safe way to do it?

Was it helpful?

Solution

Create a PHP script and access it, the contents of which should be

<?php phpinfo(); ?>

Look for information about safe mode. Also, as a note, safe mode has been removed from PHP 5.4+.

WordPress may think it's in safe mode either, because it still is in safe mode or it is being denied permissions it needs, and it's putting it down to being in safe mode. Also, that error message looks like a message generated by PHP and not WordPress in which case safe mode really is still likely to still be enabled. You can read more in Safe Mode (PHP Manual).

As for the permissions, 777 is not a good idea as scripts could be uploaded and executed. I thought WordPress should be good at preventing scripts to be uploaded in the first place - but you never know, which is why it's usually best to set the most restrictive permissions. Usually you just need read and write access. To read more, see Understanding File Permissions in FTP (CHMOD).

OTHER TIPS

777 is too broad, try 755.

Wordpress.org: Changing File Permissions

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top