0

The day before yesterday I ordered my own VPS. But now I have problems with Wordpress, Wordpress is not able to create a .htaccess by itself, not able to write to it and plugins aren't able to create files/folders.

Support hadn't the time for me, so since yesterday I'm looking for a solution by myself, with no luck.

If I change the CHMOD of all folders and files to 777 or 755, I still cannot write files/folders. So I looked further, the owner/group of my www folder on the vps is webapps:apache. I tried to change webapps to the user "root", "nobody", "apache" and "admin". But nothing worked.

Does somebody else has another possible solution?

1 Answers1

1
  1. check the apache error log
  2. try lsattr, perhaps there are extended attributes in place.
  3. check php open_basedir parameter in php.ini
  4. check php safe_mode in php.ini (if it's an old php)

UPDATE:

  1. do an ls -lLd public_html/ (or your DocumentRoot, e.g. /var/www, or whatever)
  2. do an lsattr public_html/
  3. check apache's owner/group : ps -ef|grep apache or ps -ef|grep http
  4. put inside the documentroot a php like x.php and access it with the browser.

x.php contents:

<?php
var_dump(ini_get('open_basedir'));
var_dump(ini_get('safe_mode'));
echo exec('whoami');
?>
sivann
  • 563
  • 5
  • 16
  • 1. I don't see anything strange. http://sexydameslingerie.nl/error_log 2. http://bestwordpresswidgets.org/lsattr.PNG 3. open_basedir: /home/admin/:/tmp:/var/tmp:/usr/local/lib/php/ 4. safe_mode is disabled – Erik van de Ven Mar 23 '13 at 12:43
  • * do the lsattr inside the DocumentRoot (public_html probably) * see the updated content in my post – sivann Mar 23 '13 at 12:54
  • 1. see http://bestwordpresswidgets.org/screenshot.PNG 2. [admin@vps32483 ~]$ lsattr public_html lsattr: Operation not supported While reading flags on public_html 3. I can create files trough FTP and access them via the browser, if that's what you mean. Only Wordpress is not able to read files and create files or folders. – Erik van de Ven Mar 23 '13 at 13:22
  • http://sexydameslingerie.nl/x.php And with ps -ef|grep http I get apache returned. And with ps -ef|grep http I get root and apache returned – Erik van de Ven Mar 23 '13 at 13:30
  • @ErikVandeVen 1. you are not showing us the dir permissions. Please do ls -lLd public_html 2. open php.ini and add domains/sexydames... in open_basedir – sivann Mar 23 '13 at 13:50
  • in open_basedir add the full path. Or just disable it. – sivann Mar 23 '13 at 13:56
  • 1) http://bestwordpresswidgets.org/lsld.PNG 2) open_basedir isn't working :(:( Look at http://sexydameslingerie.nl/, I have added the line. Even when I totally disable open_basedir I'm still not able to write files/directories :( – Erik van de Ven Mar 23 '13 at 18:52
  • Problem is solved. Someone suggested me to install suPHP and all problems are solved! Thanks you for all your help, anyway. Really appreciate it! – Erik van de Ven Mar 23 '13 at 20:09