- Where Developers Learn, Share, & Build Careers


This is my problem,

In Windows I am creating a zip file that contains a text. Sh file which is supposed to execute in linux. At the other end, the user opens the zip file in Linux and tries to execute the .sh file, but the executed permission disappears. So the user has to do it manually (as explained below:.)

How can I do this in Windows. SB is executable and add it to a zip file so that when the zip file is in Linux. Also retains the permission for its execution (so that the user should not do it manually)

That I know the permission system in Linux in such a way

I think that whatever you can do is to run a custom unzip one liner on your Linux user at the prompt:

  Zip and zip. X_script_name.sh   

If you have several scripts that you want as a grant_perms Sh to allow write:

  #! / Bin / bash # file: grant_perms.sh chmod + x script_1.sh chmod + X sc Rip_2.sh ... chmod + x script_n.sh   

(You can put all the scripts on a line for chmod, but I can get different lines with w oh and shell With script commands.)

And now your unzip becomes one liner:

  unzip zip_name.zip & amp; Source grant_perms.sh   

Note that when you are using source to run grant_perms.sh , then Execution permission is not required

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -