File permission issue
See original GitHub issueIs this a bug report?
Yes.
yarn create react-app <NAME>
cd <NAME>
ls -l
ls -l src
You’ll find that many normal files have the x
permission(100755)
All files with 100755 permission:
.gitignore
README.md
public/favicon.ico
public/index.html
public/manifest.json
src/App.css
src/App.js
src/App.test.js
src/index.css
src/index.js
src/logo.svg
src/serviceWorker.js
yarn.lock
I don’t think they really need x
permission.
Did you try recovering your dependencies?
No dependencies. I ran those commands in a pure newly installed OS.
Which terms did you search for in User Guide?
I’ve searched for previous issues and Google. No solution.
Environment
Environment Info:
System: OS: Linux 4.9 Debian GNU/Linux 9 (stretch) 9 (stretch) CPU: x64 Intel® Xeon® Platinum 8163 CPU @ 2.50GHz Binaries: Node: 10.15.1 - ~/node-v10.15.1-linux-x64/bin/node Yarn: 1.14.0 - ~/yarn-v1.14.0/bin/yarn npm: 6.4.1 - ~/node-v10.15.1-linux-x64/bin/npm npmPackages: react: ^16.7.0 => 16.7.0 react-dom: ^16.7.0 => 16.7.0 react-scripts: 2.1.3 => 2.1.3 npmGlobalPackages: create-react-app: Not Found
Steps to Reproduce
yarn create react-app <NAME>
cd <NAME>
ls -l
ls -l src
Expected Behavior
All the normal files should be 100644
Actual Behavior
Reproducible Demo
Can’t give an online demo.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:9
- Comments:9 (3 by maintainers)
Top GitHub Comments
I’m going to close this for now. If it happens again open a new issue and we can investigate.
Many people are working on Unix/Linux based system, I think most of them are sensitive to the file permissions. It is just a rule that shouldn’t be broken.
I found this part of code in
packages/react-scripts/scripts/init.js
, it seems like all the files are copied fromtemplate
ortemplate-typescript
folder. But the files under them don’t have executable permissions. If I runyarn create-react-app <NAME>
in this repository, the generated files all have the right permission: And we can see this generated project usesreact-scripts
in source code, not from NPM bundle:I tried this in macOS 10.14.2 and Debian 9.6, same result.
So I don’t know what’s wrong with the
create-react-app
orreact-scripts
in NPM bundle.