{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/21413","labels_url":"https://api.github.com/repos/owncloud/core/issues/21413/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/21413/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/21413/events","html_url":"https://github.com/owncloud/core/issues/21413","id":124562502,"number":21413,"title":"occ files:scan not possible to run as root","user":{"login":"jancborchardt","id":925062,"avatar_url":"https://avatars.githubusercontent.com/u/925062?v=3","gravatar_id":"","url":"https://api.github.com/users/jancborchardt","html_url":"https://github.com/jancborchardt","followers_url":"https://api.github.com/users/jancborchardt/followers","following_url":"https://api.github.com/users/jancborchardt/following{/other_user}","gists_url":"https://api.github.com/users/jancborchardt/gists{/gist_id}","starred_url":"https://api.github.com/users/jancborchardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jancborchardt/subscriptions","organizations_url":"https://api.github.com/users/jancborchardt/orgs","repos_url":"https://api.github.com/users/jancborchardt/repos","events_url":"https://api.github.com/users/jancborchardt/events{/privacy}","received_events_url":"https://api.github.com/users/jancborchardt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/owncloud/core/labels/clarification%20request","name":"clarification request","color":"fbca04"},{"url":"https://api.github.com/repos/owncloud/core/labels/comp:console-occ","name":"comp:console-occ","color":"d4c5f9"},{"url":"https://api.github.com/repos/owncloud/core/labels/enhancement","name":"enhancement","color":"02e10c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-01-01T21:42:10Z","updated_at":"2016-01-02T21:30:56Z","closed_at":"2016-01-02T21:30:56Z","body":"```\r\n$ sudo php console.php files:scan --all\r\nConsole has to be executed with the user that owns the file config/config.php\r\nCurrent user: root\r\nOwner of config.php: www-data\r\n```\r\nShouldn’t it be possible to run that as root as well, since that user has access to all files anyway?\r\n\r\nBecause right now, this restriction led me to defining this ridiculous alias:\r\n```\r\nalias owncloudscan='cd ~/owncloud; sudo chown root config/config.php; sudo php console.php files:scan --all; sudo chown www-data config/config.php'\r\n```"},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/168429240","html_url":"https://github.com/owncloud/core/issues/21413#issuecomment-168429240","issue_url":"https://api.github.com/repos/owncloud/core/issues/21413","id":168429240,"user":{"login":"MorrisJobke","id":245432,"avatar_url":"https://avatars.githubusercontent.com/u/245432?v=3","gravatar_id":"","url":"https://api.github.com/users/MorrisJobke","html_url":"https://github.com/MorrisJobke","followers_url":"https://api.github.com/users/MorrisJobke/followers","following_url":"https://api.github.com/users/MorrisJobke/following{/other_user}","gists_url":"https://api.github.com/users/MorrisJobke/gists{/gist_id}","starred_url":"https://api.github.com/users/MorrisJobke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MorrisJobke/subscriptions","organizations_url":"https://api.github.com/users/MorrisJobke/orgs","repos_url":"https://api.github.com/users/MorrisJobke/repos","events_url":"https://api.github.com/users/MorrisJobke/events{/privacy}","received_events_url":"https://api.github.com/users/MorrisJobke/received_events","type":"User","site_admin":false},"created_at":"2016-01-02T21:30:56Z","updated_at":"2016-01-02T21:30:56Z","body":"> They didn’t show up before.\r\n\r\nYep. Because you forced the script to run as root you messed up your directory permissions and the web server can't read/write anymore (because some files where written by root). Nothing we can do here. If the admin decides to force trick our own checks (we added this because of this specific problem you now run into). \r\n\r\nNothing we can do here - try to give the web server the permissions to read the files inside data/ and all should be fine.\r\n\r\nClosing."}}