{"action":"closed","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/19347","repository_url":"https://api.github.com/repos/symfony/symfony","labels_url":"https://api.github.com/repos/symfony/symfony/issues/19347/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/19347/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/19347/events","html_url":"https://github.com/symfony/symfony/issues/19347","id":165054875,"number":19347,"title":"UploadedFile::move permissions","user":{"login":"taviroquai","id":498409,"avatar_url":"https://avatars.githubusercontent.com/u/498409?v=3","gravatar_id":"","url":"https://api.github.com/users/taviroquai","html_url":"https://github.com/taviroquai","followers_url":"https://api.github.com/users/taviroquai/followers","following_url":"https://api.github.com/users/taviroquai/following{/other_user}","gists_url":"https://api.github.com/users/taviroquai/gists{/gist_id}","starred_url":"https://api.github.com/users/taviroquai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taviroquai/subscriptions","organizations_url":"https://api.github.com/users/taviroquai/orgs","repos_url":"https://api.github.com/users/taviroquai/repos","events_url":"https://api.github.com/users/taviroquai/events{/privacy}","received_events_url":"https://api.github.com/users/taviroquai/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/symfony/symfony/labels/Feature","name":"Feature","color":"02e10c"},{"url":"https://api.github.com/repos/symfony/symfony/labels/HttpFoundation","name":"HttpFoundation","color":"DDDDDD"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-07-12T11:21:31Z","updated_at":"2016-08-09T13:26:22Z","closed_at":"2016-08-09T13:26:22Z","body":"Hi,\r\n\r\nThis is a request to add a third argument (file permissions) to the move method signature.\r\n\r\nFrom the following line, we can see that there is an attempt to set the file permissions.\r\nhttps://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/File/UploadedFile.php#L230\r\n\r\nWould it be possible to add a third argument with default permissions, ending as:\r\n\r\n```\r\n    /**\r\n     * Moves the file to a new location.\r\n     *\r\n     * @param string $directory        The destination folder\r\n     * @param string $name             The new file name\r\n     * @param integer $permissions The desired file permissions \r\n     *\r\n     * @return File A File object representing the new file\r\n     *\r\n     * @throws FileException if, for any reason, the file could not have been moved\r\n     */\r\n    public function move($directory, $name = null, $permissions = 0666)\r\n```\r\n\r\nAnd then applying it in the line 230:\r\n```\r\n        @chmod($target, $permissions & ~umask());\r\n```\r\n\r\nThanks :)\r\n"}}
{"actor":{"display_login":"jakzal"}}