AssetManager icon indicating copy to clipboard operation
AssetManager copied to clipboard

umask

Open bacinsky opened this issue 10 years ago • 2 comments

Hi, the umask is used to set right file permissions of cached files in the FilePathCache https://github.com/RWOverdijk/AssetManager/blob/fed0e5cc6799a595627c79c41da4492f6e857cc0/src/AssetManager/Cache/FilePathCache.php#L74 but I'm using the Assetc's FilesystemCache also but there is no umask fix, so I wonder if it will be good to provide that fix within the AssetManager or I have to handle it by myself. I think it's kind of a common issue, but maybe there is a better solution I dont' know.

class FilesystemCache extends \Assetic\Cache\FilesystemCache
{
    /**
     * {@inheritdoc}
     */
    public function set($key, $value)
    {
        $umask = umask(0);
        parent::set($key, $value);
        umask($umask);
    }
}

bacinsky avatar Jul 02 '15 17:07 bacinsky

Hey :)

If this is a real issue with Assetic I think you should post your issue there.

RWOverdijk avatar Jul 03 '15 06:07 RWOverdijk

I went through their issues and they recommend to set umask on a system level, but I don't think that is the best option. Anyways I'm using asset manager only for a development so I noticed this package is using umask to fix that behaviour so I assumed it will be nice ho have it here. But if this is not a case I will leave that fix in my development package.

https://github.com/kriswallsmith/assetic/issues/599

bacinsky avatar Jul 03 '15 09:07 bacinsky