Repository: flutter
Issue: Chmod error while trying to run the default project
Labels: c: crash,tool,t: gradle,platform-linux,P2,team-tool,triaged-tool

When I try to run the default project using `flutter run`, the gradle task "assembleDebug" fails because of a chmod command that cannot run.

<details> 
<summary>logs</summary> 


```
[  +79 ms] executing: [/home/alexandre/snap/flutter/common/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[  +18 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] bbfbf1770cca2da7c82e887e4e4af910034800b6
[        ] executing: [/home/alexandre/snap/flutter/common/flutter/] git tag --contains HEAD
[ +129 ms] Exit code 0 from: git tag --contains HEAD
[   +1 ms] 1.20.2
[   +5 ms] executing: [/home/alexandre/snap/flutter/common/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[   +2 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/beta
[        ] executing: [/home/alexandre/snap/flutter/common/flutter/] git ls-remote --get-url origin
[   +2 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +27 ms] executing: [/home/alexandre/snap/flutter/common/flutter/] git rev-parse --abbrev-ref HEAD
[   +3 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] beta
[  +24 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[   +7 ms] executing: /home/alexandre/Android/Sdk/platform-tools/adb devices -l
[  +21 ms] List of devices attached
           emulator-5554          device product:sdk_gphone_x86 model:Android_SDK_built_for_x86 device:generic_x86 transport_id:1
[   +8 ms] /home/alexandre/Android/Sdk/platform-tools/adb -s emulator-5554 shell getprop
[  +17 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +130 ms] Generating /mnt/Data/Document/Flutter/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
[  +15 ms] ro.hardware = ranchu
[  +10 ms] Using hardware rendering with device Android SDK built for x86. If you notice graphics artifacts, consider enabling software rendering with
           "--enable-software-rendering".
[  +21 ms] Starting incremental build...
[   +1 ms] Initializing file store
[   +7 ms] Skipping target: gen_localizations
[   +5 ms] complete
[   +2 ms] Launching lib/main.dart on Android SDK built for x86 in debug mode...
[   +3 ms] /home/alexandre/snap/flutter/common/flutter/bin/cache/dart-sdk/bin/dart --disable-dart-dev
/home/alexandre/snap/flutter/common/flutter/bin/cache/artifacts/engine/linux-x64/frontend_server.dart.snapshot --sdk-root
/home/alexandre/snap/flutter/common/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --incremental --target=flutter --debugger-module-names
-Ddart.developer.causal_async_stacks=true --output-dill /tmp/flutter_tools.HKYBVH/flutter_tool.SCIKGK/app.dill --packages .packages -Ddart.vm.profile=false
-Ddart.vm.product=false
--bytecode-options=source-positions,local-var-info,debugger-stops,instance-field-initializers,keep-unreachable-code,avoid-closure-call-instructions
--enable-asserts --track-widget-creation --filesystem-scheme org-dartlang-root --initialize-from-dill build/cache.dill.track.dill
[  +11 ms] executing: /home/alexandre/Android/Sdk/platform-tools/adb -s emulator-5554 shell -x logcat -v time -t 1
[  +12 ms] Exit code 0 from: /home/alexandre/Android/Sdk/platform-tools/adb -s emulator-5554 shell -x logcat -v time -t 1
[        ] --------- beginning of main
           08-21 14:21:35.875 I/DeviceStateChecker( 2472): DeviceStateChecker cancelled
[        ] executing: /home/alexandre/Android/Sdk/platform-tools/adb -s emulator-5554 shell -x logcat -v time -t 1
[  +11 ms] Exit code 0 from: /home/alexandre/Android/Sdk/platform-tools/adb -s emulator-5554 shell -x logcat -v time -t 1
[        ] --------- beginning of main
           08-21 14:21:35.875 I/DeviceStateChecker( 2472): DeviceStateChecker cancelled
[   +4 ms] <- compile package:example/main.dart
[   +6 ms] executing: /home/alexandre/Android/Sdk/platform-tools/adb version
[   +8 ms] Android Debug Bridge version 1.0.41
           Version 30.0.4-6686687
           Installed as /home/alexandre/Android/Sdk/platform-tools/adb
[   +1 ms] executing: /home/alexandre/Android/Sdk/platform-tools/adb start-server
[   +3 ms] Building APK
[  +13 ms] Running Gradle task 'assembleDebug'...
[   +1 ms] gradle.properties already sets `android.enableR8`
[   +2 ms] Using gradle from /mnt/Data/Document/Flutter/example/android/gradlew.
[        ] /mnt/Data/Document/Flutter/example/android/gradlew mode: 33279 rwxrwxrwx.
[   +5 ms] executing: /opt/android-studio/jre/bin/java -version
[  +36 ms] Exit code 0 from: /opt/android-studio/jre/bin/java -version
[        ] openjdk version "1.8.0_242-release"
           OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
           OpenJDK 64-Bit Server VM (build 25.242-b3-6222593, mixed mode)
[   +2 ms] executing: [/mnt/Data/Document/Flutter/example/android/] /mnt/Data/Document/Flutter/example/android/gradlew -Pverbose=true
-Ptarget-platform=android-x86 -Ptarget=/mnt/Data/Document/Flutter/example/lib/main.dart -Ptrack-widget-creation=true -Pfilesystem-scheme=org-dartlang-root
assembleDebug
[+2142 ms] > Task :app:compileFlutterBuildDebug FAILED
[        ] [ +104 ms] executing: [/home/alexandre/snap/flutter/common/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] [  +24 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] [        ] bbfbf1770cca2da7c82e887e4e4af910034800b6
[        ] [        ] executing: [/home/alexandre/snap/flutter/common/flutter/] git tag --contains HEAD
[        ] [ +152 ms] Exit code 0 from: git tag --contains HEAD
[        ] [        ] 1.20.2
[        ] [   +6 ms] executing: [/home/alexandre/snap/flutter/common/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[        ] [   +3 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] [        ] origin/beta
[        ] [        ] executing: [/home/alexandre/snap/flutter/common/flutter/] git ls-remote --get-url origin
[        ] [   +3 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] [        ] https://github.com/flutter/flutter.git
[        ] [  +32 ms] executing: [/home/alexandre/snap/flutter/common/flutter/] git rev-parse --abbrev-ref HEAD
[        ] [   +3 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] [        ] beta
[        ] [  +24 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] [   +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] [   +5 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ] [        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[        ] [  +61 ms] Initializing file store
[        ] [  +12 ms] Done initializing file store
[        ] [  +31 ms] Skipping target: gen_localizations
[        ] [ +503 ms] Skipping target: kernel_snapshot
[        ] [ +317 ms] Skipping target: debug_android_application
[        ] [        ] Persisting file store
[        ] [   +7 ms] Done persisting file store
[        ] [   +5 ms] build succeeded.
[        ] [   +7 ms] "flutter assemble" took 962ms.
[        ] [   +2 ms] ensureAnalyticsSent: 0ms
[        ] [   +1 ms] Running shutdown hooks
[        ] [        ] Shutdown hooks complete
[        ] [   +2 ms] exiting with code 0
[        ] 1 actionable task: 1 executed
[   +1 ms] chmod: modification des droits de '/mnt/Data/Document/Flutter/example/build/app/intermediates/flutter/debug/flutter_assets': Opération non
permise
[   +2 ms] chmod: modification des droits de '/mnt/Data/Document/Flutter/example/build/app/intermediates/flutter/debug/flutter_assets/AssetManifest.json':
Opération non permise
[        ] chmod: modification des droits de '/mnt/Data/Document/Flutter/example/build/app/intermediates/flutter/debug/flutter_assets/FontManifest.json':
Opération non permise
[        ] chmod: modification des droits de '/mnt/Data/Document/Flutter/example/build/app/intermediates/flutter/debug/flutter_assets/fonts': Opération non
permise
[        ] chmod: modification des droits de
'/mnt/Data/Document/Flutter/example/build/app/intermediates/flutter/debug/flutter_assets/fonts/MaterialIcons-Regular.ttf': Opération non permise
[        ] chmod: modification des droits de
'/mnt/Data/Document/Flutter/example/build/app/intermediates/flutter/debug/flutter_assets/isolate_snapshot_data': Opération non permise
[        ] chmod: modification des droits de '/mnt/Data/Document/Flutter/example/build/app/intermediates/flutter/debug/flutter_assets/kernel_blob.bin':
Opération non permise
[        ] chmod: modification des droits de '/mnt/Data/Document/Flutter/example/build/app/intermediates/flutter/debug/flutter_assets/NOTICES': Opération
non permise
[        ] chmod: modification des droits de '/mnt/Data/Document/Flutter/example/build/app/intermediates/flutter/debug/flutter_assets/packages': Opération
non permise
[        ] chmod: modification des droits de
'/mnt/Data/Document/Flutter/example/build/app/intermediates/flutter/debug/flutter_assets/packages/cupertino_icons': Opération non permise
[        ] chmod: modification des droits de
'/mnt/Data/Document/Flutter/example/build/app/intermediates/flutter/debug/flutter_assets/packages/cupertino_icons/assets': Opération non permise
[        ] chmod: modification des droits de
'/mnt/Data/Document/Flutter/example/build/app/intermediates/flutter/debug/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf': Opération non
permise
[        ] chmod: modification des droits de '/mnt/Data/Document/Flutter/example/build/app/intermediates/flutter/debug/flutter_assets/vm_snapshot_data':
Opération non permise
[        ] FAILURE: Build failed with an exception.
[        ] * Where:
[        ] Script '/home/alexandre/snap/flutter/common/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 671
[        ] * What went wrong:
[        ] Execution failed for task ':app:compileFlutterBuildDebug'.
[        ] > Process 'command 'chmod'' finished with non-zero exit value 1
[        ] * Try:
[        ] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full
insights.
[        ] * Get more help at https://help.gradle.org
[        ] BUILD FAILED in 2s
[ +296 ms] Running Gradle task 'assembleDebug'... (completed in 2,5s)
[+1916 ms] Exception: Gradle task assembleDebug failed with exit code 1
[   +1 ms] "flutter run" took 4 776ms.
[   +3 ms] 
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
           #1      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:591:7)
           <asynchronous suspension>
           #2      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:860:18)
           <asynchronous suspension>
           #3      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:741:33)
           <asynchronous suspension>
           #4      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart)
           #5      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:29)
           #6      _rootRun (dart:async/zone.dart:1190:13)
           #7      _CustomZone.run (dart:async/zone.dart:1093:19)
           #8      _runZoned (dart:async/zone.dart:1630:10)
           #9      runZoned (dart:async/zone.dart:1550:10)
           #10     AppContext.run (package:flutter_tools/src/base/context.dart:149:18)
           #11     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:730:20)
           #12     CommandRunner.runCommand (package:args/command_runner.dart:197:27)
           #13     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:332:21)
           #14     _rootRunUnary (dart:async/zone.dart:1198:47)
           #15     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
           #16     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
           #17     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
           #18     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
           #19     Future._completeWithValue (dart:async/future_impl.dart:529:5)
           #20     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
           #21     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
           #22     FlutterVersion.checkFlutterVersionFreshness (package:flutter_tools/src/version.dart)
           #23     _rootRunUnary (dart:async/zone.dart:1198:47)
           #24     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
           #25     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
           #26     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
           #27     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
           #28     Future._completeWithValue (dart:async/future_impl.dart:529:5)
           #29     Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:567:7)
           #30     _rootRun (dart:async/zone.dart:1190:13)
           #31     _CustomZone.run (dart:async/zone.dart:1093:19)
           #32     _CustomZone.runGuarded (dart:async/zone.dart:997:7)
           #33     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
           #34     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
           #35     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
           #36     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
           #37     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)
           
           
[   +1 ms] Running shutdown hooks
[        ] Shutdown hook priority 4
[   +2 ms] Shutdown hooks complete
[        ] exiting with code 1
```

## Steps to Reproduce

<!-- Please tell us exactly how to reproduce the problem you are running into. -->

1. On linux Manjaro KDE 5.7.14, installed flutter using snapd
2. flutter doctor clear (see below)
3. create a new project using `flutter create example`
4. try to run project on emulator with `flutter run`

## Logs

<!--
      Include the full logs of the commands you are running between the lines
      with the backticks below. If you are running any "flutter" commands,
      please include the output of running them with "--verbose"; for example,
      the output of running "flutter --verbose create foo".
-->

The log of doctor -v 
```
[✓] Flutter (Channel beta, 1.20.2, on Linux, locale fr_FR.UTF-8)
    • Flutter version 1.20.2 at /home/alexandre/snap/flutter/common/flutter
    • Framework revision bbfbf1770c (il y a 8 jours), 2020-08-13 08:33:09 -0700
    • Engine revision 9d5b21729f
    • Dart version 2.9.1

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
    • Android SDK at /home/alexandre/Android/Sdk
    • Platform android-30, build-tools 30.0.1
    • Java binary at: /opt/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Android Studio (version 4.0)
    • Android Studio at /opt/android-studio
    • Flutter plugin version 48.1.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] Connected device (1 available)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 8.0.0 (API 26) (emulator)

• No issues found!
```

</details>