What are the common pitfalls when trying to manipulate file permissions in PHP on Windows systems and how can they be avoided?

When trying to manipulate file permissions in PHP on Windows systems, a common pitfall is that the functions used for setting file permissions may not work as expected due to differences in how Windows handles permissions compared to Unix-based systems. To avoid this issue, it is recommended to use the `cacls` command in PHP to set file permissions on Windows systems.

// Set file permissions using cacls command on Windows
$filePath = 'C:/path/to/file.txt';
$permissions = 'F:\path\to\user:R';
exec("cacls $filePath /E /G $permissions");