Sysprogs forums › Forums › VisualGDB › VIsualGDB changed my file permission
- This topic has 6 replies, 3 voices, and was last updated 7 years ago by
support.
-
AuthorPosts
-
April 11, 2018 at 04:13 #20673
jiakai1000
ParticipantI create a Linux Makefile solution with VisualGDB,and choose ‘copy source locally and upload’,when VisualGDB uploaded my souce code to Linux, all files were added execute permission,and git committed this modification which I don’t want to,is there a way to solve this?thanks!
April 11, 2018 at 14:47 #20679aronrubin
ParticipantI also vote for this. Especially on overwrite permissions should be preserved. More generally, unless the file is a binary or script, I don’t want execute set.
April 13, 2018 at 02:50 #20694support
KeymasterHi,
No problem. We have added an option to explicitly specify the executable file extensions under Tools->Options->VisualGDB->Common->SSH in this build: http://sysprogs.com/files/tmp/VisualGDB-5.4.1.2172.msi
We could also add support for preserving permissions, although in our experience not all tar versions support the advanced options (VisualGDB generates tar archives on-the-fly to upload large file sets), so this might cause more trouble than convenience.
April 18, 2018 at 19:18 #20718aronrubin
ParticipantAnother thought is to use magic ala the “file” command or the corresponding library, libmagic, with MAGIC_MIME_TYPE. I would rather have an exclude list if all executables and scripts were included by default. Executables approximately defined by application/x-executable, application/x-sharedlib, application/x-archive, application/x-coff, application/x-coffexec, application/x-dosexec, application/javascript, text/x-shellscript, text/x-awk, text/x-gawk, text/x-nawk, text/x-python
-
This reply was modified 7 years ago by
aronrubin.
April 20, 2018 at 18:42 #20747support
KeymasterHi,
Thanks for the suggestion. As this is a fairly low-impact issue, we don’t want to add another dependency to a 3rd-party library like libmagic, however you could work around it by running it on your side and generating a list of exceptions to include/exclude.
To facilitate this, we have added support for the exclusion syntax to this build: http://sysprogs.com/files/tmp/VisualGDB-5.4.1.2187.msi
You can now use the “-ext1;-ext2;*” syntax to treat all file extensions except the explicitly entered exceptions as executables.
April 23, 2018 at 16:01 #20759aronrubin
ParticipantI fully understand on the third party dependency however I am not convinced extensions are sufficiently expressive. For example “README”, “mybinary”, “myscript”, and “license” all have no extension yet would likely have different permissions applied. As a simple compromise please consider reading the first 4 bytes of extensionless files for the sequences ELF (“\x7FELF”) and shell (“#!/”).
Thank you
April 23, 2018 at 21:30 #20762support
KeymasterHi,
Thanks for your input. We have added it to the backlog and will try to address it in one of the next major releases, although as this is something very specific and low-impact, the relative priority of this feature is currently low.
-
This reply was modified 7 years ago by
-
AuthorPosts
- You must be logged in to reply to this topic.