Thread: pkg_add php-fpm
View Single Post
  #8   (View Single Post)  
Old 28th March 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
Join Date: May 2008
Location: USA
Posts: 6,965

Ah, ok. There are directories that must be writeable. But using 777 is not best practice. Even the folks at recommend against it. Writeable by your webserver application may be necessary. But 777 leaves it open to other applications.

You could set the ownership of the wp-content branch to www, for example. Or, use the www group to govern access.

To reset to a default filemode of 755 for directories and 644 for files in that branch, and ownership to www, something like this could be used:
# cd /var/www/htdocs/wordpress
# find -X wp-content -type d | xargs chmod 755
# find -X wp-content -type f | xargs chmod 644
# chown -R www wp-content
Reply With Quote