Repository: flutter
Issue: Canvaskit files generated by `flutter build web` have no non-owner read permissions
Labels: tool,platform-web,a: build,has reproducible steps,P2,found in release: 3.7,team-web,triaged-web

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Steps to Reproduce

<!-- Please include full steps to reproduce so that we can reproduce the problem. -->

1. Create new project with `flutter create my_app`
2. Build the project, targeting bundled canvaskit files with `flutter build web --dart-define=FLUTTER_WEB_CANVASKIT_URL=canvaskit/ --web-renderer canvaskit`
3. Copy over to a (remote) folder served by NGINX

**Expected results:** <!-- what did you want to see? -->
Everything served properly and the app loads.

**Actual results:** <!-- what did you see? -->
All requests complete successfully except the canvaskit files, giving 403 errors.

The canvaskit files (both normal ones and profiling ones, both js and wasm) in build/web folder only has read permission for owner (`600`).

<details>
<summary>Code sample</summary>
Omitted, as it should be the default code generated by `flutter create`.

</details>

<details>
  <summary>Logs</summary>
It passes with `flutter run` as that user is the owner (myself). But NGINX uses http as the user. So it produces the following errors:

<!--
      Run your application with `flutter run --verbose` and attach all the
      log output below between the lines with the backticks. If there is an
      exception, please see if the error message includes enough information
      to explain how to solve the issue. If there is a crash, please include
      the entirety of the crash log including the backtrace.
-->

```
Jan 13 20:10:14 *server* nginx[1483408]: 2023/01/13 20:10:14 [error] 1483408#1483408: *6 open() "/var/server/apps/my-app/canvaskit/canvaskit.js" failed (13: Permission denied), client: *client*, server: my-app.domain-name, request: "GET /canvaskit/canvaskit.js HTTP/1.1", host: "my-app.domain-name", referrer: "https://my-app.domain-name/"
Jan 13 20:10:14 *server* nginx[1483408]: *server* nginx: 2023/01/13 20:10:14 [error] 1483408#1483408: *6 open() "/var/server/apps/my-app/canvaskit/canvaskit.js" failed (13: Permission denied), client: *client*, server: my-app.domain-name, request: "GET /canvaskit/canvaskit.js HTTP/1.1", host: "my-app.domain-name", referrer: "https://my-app.domain-name/"
Jan 13 20:10:14 *server* nginx[1483408]: *server* nginx: *client* - - [13/Jan/2023:20:10:14 +0000] "GET /canvaskit/canvaskit.js HTTP/1.1" 403 555 "https://my-app.domain-name/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36" "-"
```

<!--
     Run `flutter analyze` and attach any output of that command below.
     If there are any analysis errors, try resolving them before filing this issue.
-->

```
Analyzing my_app...
No issues found! (ran in 1.7s)

```

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
[✓] Flutter (Channel stable, 3.3.10, on macOS 13.1 22C65 darwin-arm, locale en-CN)
    • Flutter version 3.3.10 on channel stable at /opt/homebrew/Caskroom/flutter/3.3.10/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 135454af32 (4 weeks ago), 2022-12-15 07:36:55 -0800
    • Engine revision 3316dd8728
    • Dart version 2.18.6
    • DevTools version 2.15.0
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/jingbian/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] IntelliJ IDEA Ultimate Edition (version 2021.3.3)
    • IntelliJ at /Applications/IntelliJ UE (stable).app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin version 213.7371

[✓] VS Code (version 1.74.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 13.1 22C65 darwin-arm
    • Chrome (web)    • chrome • web-javascript • Google Chrome 108.0.5359.124

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
```

</details>


<!--
      Consider also attaching screenshots and/or videos to better
      illustrate the issue.

      You can upload them directly on GitHub.
      Beware that video file size is limited to 10MB.
-->