(PHP 4, PHP 5)
fileperms — Gets file permissions
int fileperms ( string $filename )
Gets permissions for the given file.
Path to the file.
Returns the permissions on the file, or FALSE in case of an error.
Hope this helps
Thank you Andrew. I haven't that function and never tried to look for though because if i can directly set the permissions then i did not look for that.