Question

I am making use of PHP's rename function and I notice it removes the attribute OWNER in windows.

Does anyone know how to over come this? I need to keep the files previous attributes as well as permissions.

Thanks to anyone that can shed some light on this as the php docs didn't help me.

Update

The files I am trying to rename are SQL Server Database files. (Extensions: .mdf and .ldf). I detach these databases from SQL Server and then I rename them with PHP. However, if the properties are viewed before and after. It initially has an attribute OWNER but then after renaming via PHP it does not even have an OWNER attribute!

Windows 7, SQL Server 2008, PHP 5.3.0

Was it helpful?

Solution 2

I ended up just using the copy and unlink option, not ideal but it will do for now.

OTHER TIPS

Does chown() work on Windows? See

http://www.php.net/manual/en/function.chown.php

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top