is_writeable
<?php $file_name="permissions.php"; if(is_writeable($file_name)) { echo ("The file $file_name is writeable.<br />"); } else { echo ("The file $file_name is not writeable.<br />"); } ?>