Automatically set execute permission for downloaded executables from known sources
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
0
down vote
favorite
If I understand correctly, Ubuntu would only set read and write permissions for files downloaded from the internet because umask
is applied to the files. Is there a way for files to have execute permissions when they are downloaded from trusted sources, say an internal server? Typically these files are archived as .zip.
permissions security downloads
add a comment |Â
up vote
0
down vote
favorite
If I understand correctly, Ubuntu would only set read and write permissions for files downloaded from the internet because umask
is applied to the files. Is there a way for files to have execute permissions when they are downloaded from trusted sources, say an internal server? Typically these files are archived as .zip.
permissions security downloads
1
Why would you want a .zip archive to be executable?
â Byte Commander
Jan 31 at 17:15
Sorry I meant to say binaries which are bundle in an archive when unzipped only have rw permissions. Now executable. I want these binaries to have x permissions by default when downloaded and unzipped.
â jaykumarark
Jan 31 at 17:55
1
Now that's an entirely different question and has nothing to do with the downloading, but only with how the archive was zipped and gets unzipped again. Zip archives preserve permissions by default, so if the binaries had Linux executable permission set when they were archived, these will be restored automatically.
â Byte Commander
Jan 31 at 18:04
Possibly one could write a script that unzips the archive and then checks all files for their type and make ELF files and scripts executable, but that might not always be desirable and is prone to errors. I might look into that later or tomorrow if you want that.
â Byte Commander
Jan 31 at 18:05
I see. I didn't know Zip archives preserve permissions. We have a build system which archives (using groovy scripts) our executables and puts it in a server. I thought that Ubuntu changes these permissions on download. In that case, I think I should be able to configure permissions in the groovy script. This is my hunch.
â jaykumarark
Jan 31 at 18:13
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
If I understand correctly, Ubuntu would only set read and write permissions for files downloaded from the internet because umask
is applied to the files. Is there a way for files to have execute permissions when they are downloaded from trusted sources, say an internal server? Typically these files are archived as .zip.
permissions security downloads
If I understand correctly, Ubuntu would only set read and write permissions for files downloaded from the internet because umask
is applied to the files. Is there a way for files to have execute permissions when they are downloaded from trusted sources, say an internal server? Typically these files are archived as .zip.
permissions security downloads
permissions security downloads
asked Jan 31 at 17:09
jaykumarark
1011
1011
1
Why would you want a .zip archive to be executable?
â Byte Commander
Jan 31 at 17:15
Sorry I meant to say binaries which are bundle in an archive when unzipped only have rw permissions. Now executable. I want these binaries to have x permissions by default when downloaded and unzipped.
â jaykumarark
Jan 31 at 17:55
1
Now that's an entirely different question and has nothing to do with the downloading, but only with how the archive was zipped and gets unzipped again. Zip archives preserve permissions by default, so if the binaries had Linux executable permission set when they were archived, these will be restored automatically.
â Byte Commander
Jan 31 at 18:04
Possibly one could write a script that unzips the archive and then checks all files for their type and make ELF files and scripts executable, but that might not always be desirable and is prone to errors. I might look into that later or tomorrow if you want that.
â Byte Commander
Jan 31 at 18:05
I see. I didn't know Zip archives preserve permissions. We have a build system which archives (using groovy scripts) our executables and puts it in a server. I thought that Ubuntu changes these permissions on download. In that case, I think I should be able to configure permissions in the groovy script. This is my hunch.
â jaykumarark
Jan 31 at 18:13
add a comment |Â
1
Why would you want a .zip archive to be executable?
â Byte Commander
Jan 31 at 17:15
Sorry I meant to say binaries which are bundle in an archive when unzipped only have rw permissions. Now executable. I want these binaries to have x permissions by default when downloaded and unzipped.
â jaykumarark
Jan 31 at 17:55
1
Now that's an entirely different question and has nothing to do with the downloading, but only with how the archive was zipped and gets unzipped again. Zip archives preserve permissions by default, so if the binaries had Linux executable permission set when they were archived, these will be restored automatically.
â Byte Commander
Jan 31 at 18:04
Possibly one could write a script that unzips the archive and then checks all files for their type and make ELF files and scripts executable, but that might not always be desirable and is prone to errors. I might look into that later or tomorrow if you want that.
â Byte Commander
Jan 31 at 18:05
I see. I didn't know Zip archives preserve permissions. We have a build system which archives (using groovy scripts) our executables and puts it in a server. I thought that Ubuntu changes these permissions on download. In that case, I think I should be able to configure permissions in the groovy script. This is my hunch.
â jaykumarark
Jan 31 at 18:13
1
1
Why would you want a .zip archive to be executable?
â Byte Commander
Jan 31 at 17:15
Why would you want a .zip archive to be executable?
â Byte Commander
Jan 31 at 17:15
Sorry I meant to say binaries which are bundle in an archive when unzipped only have rw permissions. Now executable. I want these binaries to have x permissions by default when downloaded and unzipped.
â jaykumarark
Jan 31 at 17:55
Sorry I meant to say binaries which are bundle in an archive when unzipped only have rw permissions. Now executable. I want these binaries to have x permissions by default when downloaded and unzipped.
â jaykumarark
Jan 31 at 17:55
1
1
Now that's an entirely different question and has nothing to do with the downloading, but only with how the archive was zipped and gets unzipped again. Zip archives preserve permissions by default, so if the binaries had Linux executable permission set when they were archived, these will be restored automatically.
â Byte Commander
Jan 31 at 18:04
Now that's an entirely different question and has nothing to do with the downloading, but only with how the archive was zipped and gets unzipped again. Zip archives preserve permissions by default, so if the binaries had Linux executable permission set when they were archived, these will be restored automatically.
â Byte Commander
Jan 31 at 18:04
Possibly one could write a script that unzips the archive and then checks all files for their type and make ELF files and scripts executable, but that might not always be desirable and is prone to errors. I might look into that later or tomorrow if you want that.
â Byte Commander
Jan 31 at 18:05
Possibly one could write a script that unzips the archive and then checks all files for their type and make ELF files and scripts executable, but that might not always be desirable and is prone to errors. I might look into that later or tomorrow if you want that.
â Byte Commander
Jan 31 at 18:05
I see. I didn't know Zip archives preserve permissions. We have a build system which archives (using groovy scripts) our executables and puts it in a server. I thought that Ubuntu changes these permissions on download. In that case, I think I should be able to configure permissions in the groovy script. This is my hunch.
â jaykumarark
Jan 31 at 18:13
I see. I didn't know Zip archives preserve permissions. We have a build system which archives (using groovy scripts) our executables and puts it in a server. I thought that Ubuntu changes these permissions on download. In that case, I think I should be able to configure permissions in the groovy script. This is my hunch.
â jaykumarark
Jan 31 at 18:13
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1001792%2fautomatically-set-execute-permission-for-downloaded-executables-from-known-sourc%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
Why would you want a .zip archive to be executable?
â Byte Commander
Jan 31 at 17:15
Sorry I meant to say binaries which are bundle in an archive when unzipped only have rw permissions. Now executable. I want these binaries to have x permissions by default when downloaded and unzipped.
â jaykumarark
Jan 31 at 17:55
1
Now that's an entirely different question and has nothing to do with the downloading, but only with how the archive was zipped and gets unzipped again. Zip archives preserve permissions by default, so if the binaries had Linux executable permission set when they were archived, these will be restored automatically.
â Byte Commander
Jan 31 at 18:04
Possibly one could write a script that unzips the archive and then checks all files for their type and make ELF files and scripts executable, but that might not always be desirable and is prone to errors. I might look into that later or tomorrow if you want that.
â Byte Commander
Jan 31 at 18:05
I see. I didn't know Zip archives preserve permissions. We have a build system which archives (using groovy scripts) our executables and puts it in a server. I thought that Ubuntu changes these permissions on download. In that case, I think I should be able to configure permissions in the groovy script. This is my hunch.
â jaykumarark
Jan 31 at 18:13