1

I tried this:

cd /opt/lampp/htdocs/
sudo usermod -a -G daemon john
sudo find . -exec chown john:daemon {} +
sudo find . -type f -exec chmod 664 {} +
sudo find . -type d -exec chmod 775 {} +cd   <-problem child

It goes fine until the last command which gives me "find: missing argument to `-exec'"

So Wordpress cannot add or delete plugins etc... thoughts?

  • 1
    I'm certain a webserver should *not* have any write privileges to htdocs, ever. If you need your PHP software (wordpress) to write to certain locations, a) these should be outside htdocs, imho, and b) these should be very selectively made writable, not blanket. – Marcus Müller May 29 '22 at 15:49
  • You have an obvious error into what you have posted. If you run `find ... -exec ... +` and there are more characters after `+` then you get the error you describe. – thanasisp May 29 '22 at 17:47
  • @MarcusMüller thanks for the reply. Not sure what .htdocs has to do with this. In any case, we are on localhost, so the security level is not so important (I wouldn't think). – user2107656 May 29 '22 at 17:48
  • the folder you're operating in is called "htdocs", and it's typically the folder that your webserver serves publicly. – Marcus Müller May 29 '22 at 17:49
  • ok @thanasisp ran that line without "cd" restarted lampp and seems to be good to go. thx – user2107656 May 29 '22 at 17:53

0 Answers0