On 01/19/2018 08:14 PM, William Hubbs wrote:
>>
>> Why not? Since /var/lib is root:root and mode 755, we can create
>> /var/lib/foo while running --as=root (the default). Then afterwards,
>> anything beneath /var/lib/foo would need to be created "--as" the owner
>> of that directory.
> 
> That would create an extra level of indirection for some things though,
> what if /var/lib/foo needs to be owned by foo? I have /var/lib/dhcp
> which is owned by dhcp:dhcp. You can't creat that with --as=dhcp.
> 

The same way you do it now:

  newpath --directory /var/lib/dhcp --owner dhcp:dhcp

There's no new obstacle, because /var/lib is writable only by root and
the current OpenRC user (also root, in this case).

Now if you need /var/lib/dhcp/something-else to be owned by dhcp:dhcp,
*then* you would do it --as=dhcp.

Reply via email to