I make a class - a wrapper over the stream for interacting with the phar archive. When implementing the stream_metadata method, I encountered a problem: chown and chgrp do not work with files:
chown('phar://path_to_phar.tar.gz/file.name', 'user_name');
chown (): Can not call chown () for a non-standard stream