chown chmod

Ryan Schmidt ryandesign at macports.org
Tue Jun 9 18:02:48 PDT 2009


On Jun 8, 2009, at 17:53, Toby Peterson wrote:

> On Jun 8, 2009, at 3:47 PM, Bradley Giesbrecht wrote:
>
>> What is the macports way to change owner and permissions of files,  
>> like log files for example?
>>
>> Is there something in TCL or do we just use system commands?
>
> chown: file attributes -owner ...
> chmod: file attributes -permissions ...
>
> see 'man n file'

Correct, but this would not be applicable to log files, which no  
MacPorts ports should be installing. logfiles are user data, thus  
should not be registered to a port. A port could, however, install a  
directory into which the software will write a log file, which should  
have the correct ownership and permissions for the software to do so.  
However you don't need "file attributes" to do this; you can use the  
arguments to the "xinstall" command to do it at the same time you  
create the directory.




More information about the macports-dev mailing list