lundi 19 mai 2014

copier le fichier OSX avec autorisations - Stack Overflow


I have an OSX FTDIUSBSerialDriver.kext file for an FTDI Chipset Driver where the Info.plist file has been modified for optimum performance.


I would like to supply the modified file to users of our hardware, so that it can be copied to: MacHD/System/Library/Extensions/ and it must have "system" ownership and permissions.


What would be the easiest way to:



  1. Copy the working FTDIUSBSerialDriver.kext file (package) retaining the current ownership and priveleges for distribution ?


  2. Provide the user with "simple" terminal instructions on how to copy and overwrite the file to MacHD/System/Library/Extensions/ with system ownership and permissions ?



Every time I try and test, the permissions and ownership get set to the current user so the driver will not load at startup.


It would be optimal if I could bundle this as a simple installer, so the user could just double click to install.


Thanks


Peter


Edit: Needs to work on 10.6.8 and above. I am aware of a finder option in OS X 10.8 that allows for "duplicate exactly" and "paste exactly", but this is not an option for everyone.




you can use cp -p



-p Cause cp to preserve the following attributes of each source file in the copy: modification time, access time, file flags, file mode, user ID, and group ID, as allowed by permissions. Access Control Lists (ACLs) and Extended Attributes (EAs), including resource forks, will also be preserved.




I have an OSX FTDIUSBSerialDriver.kext file for an FTDI Chipset Driver where the Info.plist file has been modified for optimum performance.


I would like to supply the modified file to users of our hardware, so that it can be copied to: MacHD/System/Library/Extensions/ and it must have "system" ownership and permissions.


What would be the easiest way to:



  1. Copy the working FTDIUSBSerialDriver.kext file (package) retaining the current ownership and priveleges for distribution ?


  2. Provide the user with "simple" terminal instructions on how to copy and overwrite the file to MacHD/System/Library/Extensions/ with system ownership and permissions ?



Every time I try and test, the permissions and ownership get set to the current user so the driver will not load at startup.


It would be optimal if I could bundle this as a simple installer, so the user could just double click to install.


Thanks


Peter


Edit: Needs to work on 10.6.8 and above. I am aware of a finder option in OS X 10.8 that allows for "duplicate exactly" and "paste exactly", but this is not an option for everyone.



you can use cp -p



-p Cause cp to preserve the following attributes of each source file in the copy: modification time, access time, file flags, file mode, user ID, and group ID, as allowed by permissions. Access Control Lists (ACLs) and Extended Attributes (EAs), including resource forks, will also be preserved.



0 commentaires:

Enregistrer un commentaire