Geoff4096
Joined: 07 Jun 2018 Posts: 4
|
Posted: Mon Jun 11, 2018 12:31 pm Post subject: Permissions on encoded files |
|
|
I'm having an issue (ionCube 10) with file permissions which are set by --merge-target and/or --update-target
Using a project file which contains
Code: | ...
--without-keeping-file-perms
--without-keeping-file-times
--apply-file-user apache
--apply-file-group apache
|
and running either --merge-target or --update-target the file permissions on the output files are being set to 777.
Running the same project file but with --replace-target the file perms are set to 644, which is what I would expect according to the ACL for the output directory.
But editing a file and then running merge or update, the file perms are overwritten with 777.
If I run --update-target when the output file does not exist, it is created with 644. But if I touch the source file and then re-run --update-target it gets overwritten with 777.
The only ref I can find in the manual is Code: | 3.8.2 Using Default File Permissions [--without-keeping-file-perms]
This option applies the default file permissions to target files instead of copying permissions of
the corresponding source file. | but it doesn't define "default file permissions" - I assume this is whatever Linux determines?
So why are my files being set to 777 during --merge-target or --update-target but 644 with --replace-target ?
TIA
Steps to reproduce:
1. touch a source file
2. delete compiled copy of that file
3. run encoder with --update-target
4. result= compiled file created with 644
5. touch the source file again
6. run encoder with --update-target
7. result= compiled file changed to 777
getfacl :
# file: ******/encoded/
# owner: apache
# group: apache
user::rwx
group::r-x
other::r-x
# file: ******/encoded/file.php
# owner: apache
# group: apache
user::rw-
group::r--
other::r-- |
|