bug #27903 [Lock] fix lock file permissions (fritzmg)
bug #27903 [Lock] fix lock file permissions (fritzmg)

This PR was squashed before being merged into the 3.4 branch (closes #27903).

Discussion
----------

[Lock] fix lock file permissions

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | see discussion below
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

See [this comment](https://github.com/symfony/symfony/pull/27668#issuecomment-403392924). Since we are using `r+` now to fix an issue on Solaris, we also need to change the file permissions when the lock file is created for the first time. Otherwise
```php
fopen($fileName, 'r+')
```
will fail due to the file permissions and while
```php
fopen($fileName, 'r')
```
will work, the subsequent locking will again fail on Solaris.

Changing the file permissions to `0666` fixes this issue. __However__ any lock file that was generated _prior_ to this change will still cause issues and would need to be manually deleted. Usually the default `sys_get_temp_dir()` location is used for the lock files and _usually_ these files are purged periodically, so it probably won't matter that much. But it still might cause some confusion since it will not be transparent, why the file lock failed on Solaris systems.

Commits
-------

23481a112e [Lock] fix lock file permissions

andreia/symfony,arjenm/symfony,andreia/symfony,joelwurtz/symfony,deguif/symfony,derrabus/symfony,hhamon/symfony,tgalopin/symfony,andrerom/symfony,oleg-andreyev/symfony,tucksaun/symfony,Tobion/symfony,jderusse/symfony,xabbuh/symfony,andrerom/symfony,mweimerskirch/symfony,mpdude/symfony,Taluu/symfony,mnapoli/symfony,mweimerskirch/symfony,Koc/symfony,weaverryan/symfony,docteurklein/symfony,jakzal/symfony,bendavies/symfony,tgalopin/symfony,xabbuh/symfony,OskarStark/symfony,pierredup/symfony,Simperfit/symfony,paradajozsef/symfony,romaricdrigon/symfony,andrerom/symfony,jvasseur/symfony,romaricdrigon/symfony,maidmaid/symfony,alekitto/symfony,Simperfit/symfony,zorn-v/symfony,fabpot/symfony,Slamdunk/symfony,bendavies/symfony,lstrojny/symfony,yceruto/symfony,HeahDude/symfony,garak/symfony,MatTheCat/symfony,HeahDude/symfony,frankdejonge/symfony,Einenlum/symfony,zcodes/symfony,Nyholm/symfony,derrabus/symfony,nicolas-grekas/symfony,ogizanagi/symfony,docteurklein/symfony,e-moe/symfony,Tobion/symfony,vincentaubert/symfony,bendavies/symfony,dmaicher/symfony,ogizanagi/symfony,sroze/symfony,tucksaun/symfony,hhamon/symfony,ro0NL/symfony,gimler/symfony,gnat42/symfony,ro0NL/symfony,jderusse/symfony,smatyas/symfony,symfony/symfony,tucksaun/symfony,gnat42/symfony,shieldo/symfony,stof/symfony,e-moe/symfony,chalasr/symfony,lstrojny/symfony,teohhanhui/symfony,mweimerskirch/symfony,maidmaid/symfony,zerkms/symfony,deguif/symfony,dmaicher/symfony,zcodes/symfony,pamil/symfony,weaverryan/symfony,deguif/symfony,nicolas-grekas/symfony,vincentaubert/symfony,lyrixx/symfony,phramz/symfony,kbond/symfony,joelwurtz/symfony,smatyas/symfony,frankdejonge/symfony,lyrixx/symfony,fabpot/symfony,Tobion/symfony,joelwurtz/symfony,dmaicher/symfony,Nyholm/symfony,lyrixx/symfony,curry684/symfony,zcodes/symfony,pyrech/symfony,pyrech/symfony,jderusse/symfony,jderusse/symfony,Deamon/symfony,vincentaubert/symfony,stof/symfony,Taluu/symfony,Deamon/symfony,alekitto/symfony,gimler/symfony,lstrojny/symfony,localheinz/symfony,HeahDude/symfony,zorn-v/symfony,curry684/symfony,oleg-andreyev/symfony,Nyholm/symfony,garak/symfony,docteurklein/symfony,yceruto/symfony,paradajozsef/symfony,gonzalovilaseca/symfony,weaverryan/symfony,docteurklein/symfony,jakzal/symfony,stof/symfony,curry684/symfony,pyrech/symfony,voronkovich/symfony,1ed/symfony,alekitto/symfony,Deamon/symfony,shieldo/symfony,zerkms/symfony,gonzalovilaseca/symfony,ogizanagi/symfony,pierredup/symfony,fabpot/symfony,gimler/symfony,shieldo/symfony,ajgarlag/symfony,michaelperrin/symfony,chalasr/symfony,d-ph/symfony,sroze/symfony,zcodes/symfony,d-ph/symfony,ajgarlag/symfony,derrabus/symfony,jakzal/symfony,symfony/symfony,garak/symfony,andrerom/symfony,derrabus/symfony,zorn-v/symfony,Einenlum/symfony,deguif/symfony,d-ph/symfony,Taluu/symfony,pierredup/symfony,mpdude/symfony,frankdejonge/symfony,Slamdunk/symfony,ro0NL/symfony,yceruto/symfony,yceruto/symfony,OskarStark/symfony,teohhanhui/symfony,mnapoli/symfony,Koc/symfony,ragboyjr/symfony,michaelperrin/symfony,hhamon/symfony,pamil/symfony,smatyas/symfony,voronkovich/symfony,xabbuh/symfony,pamil/symfony,OskarStark/symfony,ragboyjr/symfony,OskarStark/symfony,mnapoli/symfony,lyrixx/symfony,Slamdunk/symfony,andreia/symfony,alekitto/symfony,shieldo/symfony,pamil/symfony,Simperfit/symfony,ragboyjr/symfony,phramz/symfony,Einenlum/symfony,gimler/symfony,damienalexandre/symfony,gnat42/symfony,d-ph/symfony,Einenlum/symfony,Simperfit/symfony,michaelperrin/symfony,dmaicher/symfony,localheinz/symfony,oleg-andreyev/symfony,Koc/symfony,ro0NL/symfony,sroze/symfony,jvasseur/symfony,arjenm/symfony,weaverryan/symfony,gonzalovilaseca/symfony,ajgarlag/symfony,sgehrig/symfony,Koc/symfony,arjenm/symfony,gnat42/symfony,chalasr/symfony,Slamdunk/symfony,ragboyjr/symfony,Nyholm/symfony,jvasseur/symfony,teohhanhui/symfony,paradajozsef/symfony,voronkovich/symfony,symfony/symfony,tgalopin/symfony,MatTheCat/symfony,tgalopin/symfony,zorn-v/symfony,mweimerskirch/symfony,symfony/symfony,ogizanagi/symfony,zerkms/symfony,zerkms/symfony,michaelperrin/symfony,nicolas-grekas/symfony,teohhanhui/symfony,tucksaun/symfony,chalasr/symfony,sroze/symfony,gonzalovilaseca/symfony,Deamon/symfony,damienalexandre/symfony,smatyas/symfony,voronkovich/symfony,MatTheCat/symfony,kbond/symfony,mpdude/symfony,mpdude/symfony,damienalexandre/symfony,1ed/symfony,mweimerskirch/symfony,kbond/symfony,sgehrig/symfony,stof/symfony,oleg-andreyev/symfony,e-moe/symfony,damienalexandre/symfony,phramz/symfony,pierredup/symfony,sgehrig/symfony,frankdejonge/symfony,Deamon/symfony,xabbuh/symfony,MatTheCat/symfony,1ed/symfony,Simperfit/symfony,sgehrig/symfony,joelwurtz/symfony,jakzal/symfony,e-moe/symfony,arjenm/symfony,nicolas-grekas/symfony,romaricdrigon/symfony,Tobion/symfony,docteurklein/symfony,hhamon/symfony,ajgarlag/symfony,jvasseur/symfony,vincentaubert/symfony,smatyas/symfony,pyrech/symfony,bendavies/symfony,mnapoli/symfony,paradajozsef/symfony,fabpot/symfony,maidmaid/symfony,curry684/symfony,maidmaid/symfony,localheinz/symfony,1ed/symfony,garak/symfony,romaricdrigon/symfony,andreia/symfony,Taluu/symfony,kbond/symfony,phramz/symfony,mnapoli/symfony,localheinz/symfony,HeahDude/symfony