src/PhpSigep/Cache/Storage/Adapter/FileSystemOptions.php
public function setUmask($umask)
    {
        if ($umask !== false) {
            if (is_string($umask)) {
                $umask = octdec($umask);
            } else {
                $umask = (int)$umask;
            }

            // validate
            if ($umask & 0700) {
                throw new Exception\InvalidArgumentException(
                    'Invalid umask: need permission to execute, read and write by owner'
                );
            }

            // normalize
            $umask = $umask & 0777;
        }

        if ($this->umask !== $umask) {
            $this->umask = $umask;
        }

        return $this;
    }
public function setUmask($umask)
    {
        if ($umask !== false) {
            if (is_string($umask)) {
                $umask = octdec($umask);
            } else {
                $umask = (int)$umask;
            }

            // validate
            if ($umask & 0700) {
                throw new Exception\InvalidArgumentException(
                    'Invalid umask: need permission to execute, read and write by owner'
                );
            }

            // normalize
            $umask = $umask & 0777;
        }

        if ($this->umask !== $umask) {
            $this->umask = $umask;
        }

        return $this;
    }
public function setUmask ( $ umask ) { if ( $ umask !== false ) { if ( is_string ( $ umask ) ) { $ umask = octdec ( $ umask ) ; } else { $ umask = ( int ) $ umask ; } // validate if ( $ umask & 0700 ) { throw new Exception \ InvalidArgumentException ( 'Invalid umask: need permission to execute, read and write by owner' ) ; } // normalize $ umask = $ umask & 0777 ; } if ( $ this -> umask !== $ umask ) { $ this -> umask = $ umask ; } return $ this ; }
Set the umask to create files and directories on unix systems

Note: On multithreaded webservers it's better to explicit set file and dir permission.

@param false|string|int $umask FALSE to disable umask or an octal number
@throws Exception\InvalidArgumentException
@return FilesystemOptions
@see setFilePermission
@see setDirPermission
@link http://php.net/manual/function.umask.php
@link http://en.wikipedia.org/wiki/Umask
Set the umask to create files and directories on unix systems