Taken from:
To be able to change permalink settings you might need to change access rights of the /var/www/html/<blogfolder>/.htaccess from 644 to 666:
### On your web server $ cd /var/www/html/<blogfolder> $ sudo chmod 666 .htaccess ### Do not forget to change back to 644 after you are done with permalinks $ sudo chmod 644 .htaccess
If after changing WordPress permalink settings you get notorious “404 page not found” then check that the bold options in theĀ <Directory /var/www/> section in theĀ /etc/apache2/apache.conf file look like this:
<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory>