<commit_before><?php

namespace Oro\Bundle\InstallerBundle\Composer;

use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Process\Exception\ProcessFailedException;
use Symfony\Component\Process\Process;

class PermissionsHandler
{
    const SETFACL = 'setfacl -Rm "u:{user}:rwX,d:u:{user}:rwX,g:{group}:rwX,d:g:{group}:rwX" {path}';
    const CHMOD   = 'chmod +a "{user} allow delete,write,append,file_inherit,directory_inherit" {path}';
    const PS_AUX  = "ps aux|grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx'|grep -v root|head -1|cut -d' ' -f1";

    const USER = '`whoami`';

    const VAR_PATH  = '{path}';
    const VAR_USER  = '{user}';
    const VAR_GROUP = '{group}';

    /**
     * @var Process
     */
    protected $process;

    /**
     * @param Process $process
     */
    public function setProcess(Process $process)
    {
        $this->process = $process;<commit_msg>OC-318: OroCRM: First Run of Web Based Installer Fails with Permissions Errors - fix group permissions<commit_after><?php

namespace Oro\Bundle\InstallerBundle\Composer;

use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Process\Exception\ProcessFailedException;
use Symfony\Component\Process\Process;

class PermissionsHandler
{
    const SETFACL = 'setfacl -Rm "u:{user}:rwX,d:u:{user}:rwX,g:{group}:rw,d:g:{group}:rw" {path}';
    const CHMOD   = 'chmod +a "{user} allow delete,write,append,file_inherit,directory_inherit" {path}';
    const PS_AUX  = "ps aux|grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx'|grep -v root|head -1|cut -d' ' -f1";

    const USER = '`whoami`';

    const VAR_PATH  = '{path}';
    const VAR_USER  = '{user}';
    const VAR_GROUP = '{group}';

    /**
     * @var Process
     */
    protected $process;

    /**
     * @param Process $process
     */
    public function setProcess(Process $process)
    {
        $this->process = $process;
{'fraction_non_alphanumeric': 0.16062992125984252, 'fraction_numerical': 0.003674540682414698, 'mean_word_length': 3.7889447236180906, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6344915', 'n_tokens_mistral': 689, 'n_tokens_neox': 675, 'n_words': 135}