WordPress Custom post type single page 404 error

I found same problem and I solved with extraordinary article of Brent Shepherd : Advanced Taxonomy Queries with Pretty URLs. This article contains a generic function to solved the problem and instructions for changes permalinks.
It’s very important don’t forget enable module php: mod_rewrite in your server and modify the archive /etc/apache2/sites-available/000-default.conf with rules:
(for example in directory localhost, add)

 <Directory "/var/www/html">
AllowOverride All
</Directory>

and restart your server: sudo service apache2 restart
This information explains in article HOW TO ENABLE MOD_REWRITE IN UBUNTU .Then follow the instructions above all permalinks work perfectly!