chown root -R /var/*
chmod 777 /var/*
Unfortunately, you likely broke a lot more that you could have ever hoped to fix with those commands.
You should make a backup of your wordpress installation and your database and look to reinstalling you server soon.
bleeber,
Thanks for the reply, could you elaborate a little though to help me understand?
Sure thing.
/var holds a lot of important information on a unix/linux based system. In var, you will find things such as logs, mail, crons, lockfiles, pidfiles, etc, etc. Each one of these files has a specific owner/group and file permissions that are needed for the program to work.
What you did, made every file now be owned by root. That’s not a good thing. Then you made every folder inside /var writable by anyone, including malicious users. Not only did you leave a huge location on disk for malicious users to store their own goodies, since /var/log/ can now be written to by anyone, they can also alter the logs on their way out.
In my professional opinion, I would backup your data, and reinstall. It would be much faster than trying to analyze all of the files that you have modified.
Thanks, aside from that though does anyone know why I may not be able to update? ftp user is root and like I said it creates the upgrade folder no problem (no files in it however).
So I went back to a fresh install of everything, I am following the instructions here:
http://codex.wordpress.org/Upgrading_WordPress
It mentions all I need to do is click “Update Automatically” and I should be good to go but I am being prompted for an FTP connection method.
Note that your files all need to be owned by the user under which your Apache server executes, or you will receive a dialog box asking for “connection information,” and you will find that no matter what you enter, you won’t be able to update.
So I ran: ps auxw | grep -E ‘http|apache|www’
and got the following:
## ps auxw | grep -E ‘http|apache|www’
root 3710 0.0 1.1 25036 7216 ? Ss 16:21 0:00 /usr/sbin/httpd
apache 3712 0.0 2.9 36996 18280 ? S 16:21 0:00 /usr/sbin/httpd
apache 3713 0.0 0.6 25036 4152 ? S 16:21 0:00 /usr/sbin/httpd
apache 3714 0.0 0.5 25036 3420 ? S 16:21 0:00 /usr/sbin/httpd
apache 3715 0.0 0.5 25036 3420 ? S 16:21 0:00 /usr/sbin/httpd
apache 3716 0.0 0.5 25036 3420 ? S 16:21 0:00 /usr/sbin/httpd
apache 3717 0.0 0.5 25036 3420 ? S 16:21 0:00 /usr/sbin/httpd
apache 3718 0.0 0.5 25036 3420 ? S 16:21 0:00 /usr/sbin/httpd
apache 3719 0.0 0.5 25036 3420 ? S 16:21 0:00 /usr/sbin/httpd
root 3864 0.0 0.1 5352 648 pts/0 S+ 16:29 0:00 grep -E http|apache|www
Also, I have tried chown -hR /var/www/html/wordpress/* (my wp install) as well as chmod 777 /var/www/html/wordpress/*
I’m probably being retarded here but I would really like to get out of the special Olympics and be a real contender.
Solved!
All I did was:
chown -Rh apache /var/www/html/wordpress/
Where /wordpress was my fresh WP install.
I hate to keep harping on your decisions and I am glad you were able to get it working but chmod’ing your entire wordpress installation 777 is still not a good idea. If there is ever a bug in either wp core or a plugin you use, your system is open for business.
This link should point you in the right direction.
http://codex.wordpress.org/Hardening_WordPress#File_permissions