Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test for file execute bit #1808

Closed
szepeviktor opened this issue Dec 23, 2017 · 7 comments · Fixed by #2582
Closed

Test for file execute bit #1808

szepeviktor opened this issue Dec 23, 2017 · 7 comments · Fixed by #2582

Comments

@szepeviktor
Copy link

It would add a value for users on non-unixy OS-es.

Thanks.

@jrfnl
Copy link
Contributor

jrfnl commented Dec 31, 2017

@szepeviktor Viktor, it's quite unclear to me what the issue is you're reporting. Would you mind expanding a bit ?

@szepeviktor
Copy link
Author

The execute bit of files - git stores only this permission.

drwxr-xr-x 12 gtone gtone   4096 Oct 28 20:33 app
-rwxr-xr-x  1 gtone gtone   1646 Jul  9 22:12 artisan <-- see here the 3 x-es
drwxr-xr-x  3 gtone gtone   4096 Oct  9 19:43 bootstrap
-rw-r--r--  1 gtone gtone   2100 Dec 29 13:11 composer.json
-rw-r--r--  1 gtone gtone 172459 Dec 29 13:11 composer.lock
drwxr-xr-x  2 gtone gtone   4096 Dec 29 13:17 config
drwxr-xr-x  5 gtone gtone   4096 Jul  9 22:12 database
-rw-r--r--  1 gtone gtone    505 Dec 29 10:10 gulpfile.js
-rw-r--r--  1 gtone gtone    212 Jul  9 22:12 package.json
drwxr-xr-x 11 gtone gtone   4096 Dec 30 06:40 public
-rw-r--r--  1 gtone gtone   1264 Jul  9 22:12 readme.md
drwxr-xr-x  5 gtone gtone   4096 Nov 24  2016 resources
drwxr-xr-x  2 gtone gtone   4096 Jul  9 22:12 scripts
-rw-r--r--  1 gtone gtone    567 Jul  9 22:12 server.php
drwxr-xr-x  8 gtone gtone   4096 Apr 15  2017 storage
drwxr-xr-x 38 gtone gtone   4096 Dec 29 13:18 vendor

@szepeviktor
Copy link
Author

As of now there is no phpcs rule to handle it.
Hint: the chmod() function handles it in PHP.

@jrfnl
Copy link
Contributor

jrfnl commented Dec 31, 2017

Ah! That makes it much clearer. So this is basically a feature request for a Generic.Files.FilePermissions sniff to check that all files in a project have file permissions set and potentially auto-fix this, if not ?

@szepeviktor
Copy link
Author

szepeviktor commented Dec 31, 2017

Yes. Only check the execution bit, and turn it off as a fix, as PHP files do not need execution bits.
Except artisan which is the CLI for Laravel.

@szepeviktor
Copy link
Author

szepeviktor commented Dec 31, 2017

Git does not store other bits, so a file will be either 644 or 755

@szepeviktor
Copy link
Author

szepeviktor commented Aug 11, 2019

A friendly ping.

Could it be that we are waiting for a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants