Are there any security risks associated with changing the default cookie storage directory in PHP?

Changing the default cookie storage directory in PHP can potentially introduce security risks as it may allow unauthorized access to sensitive information stored in cookies. To mitigate this risk, it is important to ensure that the new directory is secure and only accessible by authorized users.

<?php
// Set a custom cookie storage directory
ini_set('session.save_path', '/path/to/custom/directory');
?>