executable file problem after transfer to other system Announcing the arrival of Valued...
porting install scripts : can rpm replace apt?
How do I keep my slimes from escaping their pens?
Why did the rest of the Eastern Bloc not invade Yugoslavia?
The logistics of corpse disposal
Why did the IBM 650 use bi-quinary?
Error "illegal generic type for instanceof" when using local classes
How to tell that you are a giant?
How does the particle を relate to the verb 行く in the structure「A を + B に行く」?
Can a USB port passively 'listen only'?
Why didn't this character "real die" when they blew their stack out in Altered Carbon?
If a contract sometimes uses the wrong name, is it still valid?
What does this icon in iOS Stardew Valley mean?
How to deal with a team lead who never gives me credit?
What's the meaning of 間時肆拾貳 at a car parking sign
Is it true that "carbohydrates are of no use for the basal metabolic need"?
When were vectors invented?
Identify plant with long narrow paired leaves and reddish stems
List of Python versions
English words in a non-english sci-fi novel
How do pianists reach extremely loud dynamics?
Seeking colloquialism for “just because”
What does the "x" in "x86" represent?
How to react to hostile behavior from a senior developer?
Why aren't air breathing engines used as small first stages
executable file problem after transfer to other system
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
2019 Community Moderator Election Results
Why I closed the “Why is Kali so hard” questionRunning C Programs on LinuxProblem with $PATH and executable file“No such file or directory” when I clearly see the file listed with correct permissionsWhy updating a running Linux system is not problematic?Portions of the file HeaderResolving the location/registration of an executable in the system?Open/read Unix Executable fileIs it possible to start programs (saved in the menu) from the terminal?Executable file isn't “really there” after rsyncUnix Executable File To Text File
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I had a C program and made it executable on my 32 linux mint. For assignment purposes I had to test if it was working on university pool computers. I honestly don't know which linux distributions are installed there, just had two minutes didn't really take a look but I know that it's also 32 bit system.
So when I tried to run it in terminal (./program
), I got bash permission denied
error, which I know means that the file is not executable So I ran chmod u+x program
command again to make it executable and then it worked, my program was working just fine as on my laptop.
Does anybody know what can be the reason for that? I mean, obviously, my file is executable, at least on my linux mint, what can be the reason that it is not on some other linux distribution?
Maybe I have to make it executable in another way? I only know the one mentioned earlier chmod u+x program
.
UPDATE:
as mentioned in the comments the way I transfered my file to university computer was: download it from google drive. Now I tested on my laptop but to another system (UBUNTU), I tried again downloading from google drive the single file and the problem was same: not executable. Then I tar-ed the file (as Richard suggested) and after extracting it file was executable right away, so this leads me to conclusion that if I tar it, it should also be executable to any other system , in this case my university computer.
executable
add a comment |
I had a C program and made it executable on my 32 linux mint. For assignment purposes I had to test if it was working on university pool computers. I honestly don't know which linux distributions are installed there, just had two minutes didn't really take a look but I know that it's also 32 bit system.
So when I tried to run it in terminal (./program
), I got bash permission denied
error, which I know means that the file is not executable So I ran chmod u+x program
command again to make it executable and then it worked, my program was working just fine as on my laptop.
Does anybody know what can be the reason for that? I mean, obviously, my file is executable, at least on my linux mint, what can be the reason that it is not on some other linux distribution?
Maybe I have to make it executable in another way? I only know the one mentioned earlier chmod u+x program
.
UPDATE:
as mentioned in the comments the way I transfered my file to university computer was: download it from google drive. Now I tested on my laptop but to another system (UBUNTU), I tried again downloading from google drive the single file and the problem was same: not executable. Then I tar-ed the file (as Richard suggested) and after extracting it file was executable right away, so this leads me to conclusion that if I tar it, it should also be executable to any other system , in this case my university computer.
executable
2
How did you transfer the file from your laptop to the university computer?
– Timothy Martin
Jan 19 '17 at 18:20
@TimothyMartin I had it uploaded on my google drive and downloaded from there on university computer
– Leonardo
Jan 19 '17 at 18:21
add a comment |
I had a C program and made it executable on my 32 linux mint. For assignment purposes I had to test if it was working on university pool computers. I honestly don't know which linux distributions are installed there, just had two minutes didn't really take a look but I know that it's also 32 bit system.
So when I tried to run it in terminal (./program
), I got bash permission denied
error, which I know means that the file is not executable So I ran chmod u+x program
command again to make it executable and then it worked, my program was working just fine as on my laptop.
Does anybody know what can be the reason for that? I mean, obviously, my file is executable, at least on my linux mint, what can be the reason that it is not on some other linux distribution?
Maybe I have to make it executable in another way? I only know the one mentioned earlier chmod u+x program
.
UPDATE:
as mentioned in the comments the way I transfered my file to university computer was: download it from google drive. Now I tested on my laptop but to another system (UBUNTU), I tried again downloading from google drive the single file and the problem was same: not executable. Then I tar-ed the file (as Richard suggested) and after extracting it file was executable right away, so this leads me to conclusion that if I tar it, it should also be executable to any other system , in this case my university computer.
executable
I had a C program and made it executable on my 32 linux mint. For assignment purposes I had to test if it was working on university pool computers. I honestly don't know which linux distributions are installed there, just had two minutes didn't really take a look but I know that it's also 32 bit system.
So when I tried to run it in terminal (./program
), I got bash permission denied
error, which I know means that the file is not executable So I ran chmod u+x program
command again to make it executable and then it worked, my program was working just fine as on my laptop.
Does anybody know what can be the reason for that? I mean, obviously, my file is executable, at least on my linux mint, what can be the reason that it is not on some other linux distribution?
Maybe I have to make it executable in another way? I only know the one mentioned earlier chmod u+x program
.
UPDATE:
as mentioned in the comments the way I transfered my file to university computer was: download it from google drive. Now I tested on my laptop but to another system (UBUNTU), I tried again downloading from google drive the single file and the problem was same: not executable. Then I tar-ed the file (as Richard suggested) and after extracting it file was executable right away, so this leads me to conclusion that if I tar it, it should also be executable to any other system , in this case my university computer.
executable
executable
edited 5 hours ago
Rui F Ribeiro
42.1k1484142
42.1k1484142
asked Jan 19 '17 at 18:15
LeonardoLeonardo
1134
1134
2
How did you transfer the file from your laptop to the university computer?
– Timothy Martin
Jan 19 '17 at 18:20
@TimothyMartin I had it uploaded on my google drive and downloaded from there on university computer
– Leonardo
Jan 19 '17 at 18:21
add a comment |
2
How did you transfer the file from your laptop to the university computer?
– Timothy Martin
Jan 19 '17 at 18:20
@TimothyMartin I had it uploaded on my google drive and downloaded from there on university computer
– Leonardo
Jan 19 '17 at 18:21
2
2
How did you transfer the file from your laptop to the university computer?
– Timothy Martin
Jan 19 '17 at 18:20
How did you transfer the file from your laptop to the university computer?
– Timothy Martin
Jan 19 '17 at 18:20
@TimothyMartin I had it uploaded on my google drive and downloaded from there on university computer
– Leonardo
Jan 19 '17 at 18:21
@TimothyMartin I had it uploaded on my google drive and downloaded from there on university computer
– Leonardo
Jan 19 '17 at 18:21
add a comment |
1 Answer
1
active
oldest
votes
Because you had not done chmod u+x
, non unix files systems will not store this data, it is outside of the file: the execute bit was not copied to google-drive. Therefore you had to run chmod
again.
On the machine that you compiled it you did not have to run chmod
, as the compiler does this for you.
As long as you keep it within the Unix eco-system, the x
bit will remain. However google-drive is not Unix (though it runs on Unix). tar
is a program that can wrap us a load of files/directories into a single file, along with all of there meta-data.
I am not sure I follow, you are saying that instead of chmod u+x, I have to do chmod +x and it will work?
– Leonardo
Jan 19 '17 at 18:29
no theu
or lack of it is not relevant, I updated the answer, to avoid confusion.
– ctrl-alt-delor
Jan 19 '17 at 18:40
But, I did chmod u+x
– Leonardo
Jan 19 '17 at 18:43
Yes as you said in the question “so I ranchmod u+x program
command again to make it executable and then it worked” (emphasis mine).
– ctrl-alt-delor
Jan 19 '17 at 18:44
aha, okay, so you mean that because I had not done it on university computer that's why it did not. Okay, now my question is, what should I do so that I will not have to run chmod u+x on university computer? where is the executable bit and how can I conclude it with my file?
– Leonardo
Jan 19 '17 at 18:48
|
show 6 more comments
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f338680%2fexecutable-file-problem-after-transfer-to-other-system%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Because you had not done chmod u+x
, non unix files systems will not store this data, it is outside of the file: the execute bit was not copied to google-drive. Therefore you had to run chmod
again.
On the machine that you compiled it you did not have to run chmod
, as the compiler does this for you.
As long as you keep it within the Unix eco-system, the x
bit will remain. However google-drive is not Unix (though it runs on Unix). tar
is a program that can wrap us a load of files/directories into a single file, along with all of there meta-data.
I am not sure I follow, you are saying that instead of chmod u+x, I have to do chmod +x and it will work?
– Leonardo
Jan 19 '17 at 18:29
no theu
or lack of it is not relevant, I updated the answer, to avoid confusion.
– ctrl-alt-delor
Jan 19 '17 at 18:40
But, I did chmod u+x
– Leonardo
Jan 19 '17 at 18:43
Yes as you said in the question “so I ranchmod u+x program
command again to make it executable and then it worked” (emphasis mine).
– ctrl-alt-delor
Jan 19 '17 at 18:44
aha, okay, so you mean that because I had not done it on university computer that's why it did not. Okay, now my question is, what should I do so that I will not have to run chmod u+x on university computer? where is the executable bit and how can I conclude it with my file?
– Leonardo
Jan 19 '17 at 18:48
|
show 6 more comments
Because you had not done chmod u+x
, non unix files systems will not store this data, it is outside of the file: the execute bit was not copied to google-drive. Therefore you had to run chmod
again.
On the machine that you compiled it you did not have to run chmod
, as the compiler does this for you.
As long as you keep it within the Unix eco-system, the x
bit will remain. However google-drive is not Unix (though it runs on Unix). tar
is a program that can wrap us a load of files/directories into a single file, along with all of there meta-data.
I am not sure I follow, you are saying that instead of chmod u+x, I have to do chmod +x and it will work?
– Leonardo
Jan 19 '17 at 18:29
no theu
or lack of it is not relevant, I updated the answer, to avoid confusion.
– ctrl-alt-delor
Jan 19 '17 at 18:40
But, I did chmod u+x
– Leonardo
Jan 19 '17 at 18:43
Yes as you said in the question “so I ranchmod u+x program
command again to make it executable and then it worked” (emphasis mine).
– ctrl-alt-delor
Jan 19 '17 at 18:44
aha, okay, so you mean that because I had not done it on university computer that's why it did not. Okay, now my question is, what should I do so that I will not have to run chmod u+x on university computer? where is the executable bit and how can I conclude it with my file?
– Leonardo
Jan 19 '17 at 18:48
|
show 6 more comments
Because you had not done chmod u+x
, non unix files systems will not store this data, it is outside of the file: the execute bit was not copied to google-drive. Therefore you had to run chmod
again.
On the machine that you compiled it you did not have to run chmod
, as the compiler does this for you.
As long as you keep it within the Unix eco-system, the x
bit will remain. However google-drive is not Unix (though it runs on Unix). tar
is a program that can wrap us a load of files/directories into a single file, along with all of there meta-data.
Because you had not done chmod u+x
, non unix files systems will not store this data, it is outside of the file: the execute bit was not copied to google-drive. Therefore you had to run chmod
again.
On the machine that you compiled it you did not have to run chmod
, as the compiler does this for you.
As long as you keep it within the Unix eco-system, the x
bit will remain. However google-drive is not Unix (though it runs on Unix). tar
is a program that can wrap us a load of files/directories into a single file, along with all of there meta-data.
edited Jan 19 '17 at 19:22
answered Jan 19 '17 at 18:23
ctrl-alt-delorctrl-alt-delor
12.5k52662
12.5k52662
I am not sure I follow, you are saying that instead of chmod u+x, I have to do chmod +x and it will work?
– Leonardo
Jan 19 '17 at 18:29
no theu
or lack of it is not relevant, I updated the answer, to avoid confusion.
– ctrl-alt-delor
Jan 19 '17 at 18:40
But, I did chmod u+x
– Leonardo
Jan 19 '17 at 18:43
Yes as you said in the question “so I ranchmod u+x program
command again to make it executable and then it worked” (emphasis mine).
– ctrl-alt-delor
Jan 19 '17 at 18:44
aha, okay, so you mean that because I had not done it on university computer that's why it did not. Okay, now my question is, what should I do so that I will not have to run chmod u+x on university computer? where is the executable bit and how can I conclude it with my file?
– Leonardo
Jan 19 '17 at 18:48
|
show 6 more comments
I am not sure I follow, you are saying that instead of chmod u+x, I have to do chmod +x and it will work?
– Leonardo
Jan 19 '17 at 18:29
no theu
or lack of it is not relevant, I updated the answer, to avoid confusion.
– ctrl-alt-delor
Jan 19 '17 at 18:40
But, I did chmod u+x
– Leonardo
Jan 19 '17 at 18:43
Yes as you said in the question “so I ranchmod u+x program
command again to make it executable and then it worked” (emphasis mine).
– ctrl-alt-delor
Jan 19 '17 at 18:44
aha, okay, so you mean that because I had not done it on university computer that's why it did not. Okay, now my question is, what should I do so that I will not have to run chmod u+x on university computer? where is the executable bit and how can I conclude it with my file?
– Leonardo
Jan 19 '17 at 18:48
I am not sure I follow, you are saying that instead of chmod u+x, I have to do chmod +x and it will work?
– Leonardo
Jan 19 '17 at 18:29
I am not sure I follow, you are saying that instead of chmod u+x, I have to do chmod +x and it will work?
– Leonardo
Jan 19 '17 at 18:29
no the
u
or lack of it is not relevant, I updated the answer, to avoid confusion.– ctrl-alt-delor
Jan 19 '17 at 18:40
no the
u
or lack of it is not relevant, I updated the answer, to avoid confusion.– ctrl-alt-delor
Jan 19 '17 at 18:40
But, I did chmod u+x
– Leonardo
Jan 19 '17 at 18:43
But, I did chmod u+x
– Leonardo
Jan 19 '17 at 18:43
Yes as you said in the question “so I ran
chmod u+x program
command again to make it executable and then it worked” (emphasis mine).– ctrl-alt-delor
Jan 19 '17 at 18:44
Yes as you said in the question “so I ran
chmod u+x program
command again to make it executable and then it worked” (emphasis mine).– ctrl-alt-delor
Jan 19 '17 at 18:44
aha, okay, so you mean that because I had not done it on university computer that's why it did not. Okay, now my question is, what should I do so that I will not have to run chmod u+x on university computer? where is the executable bit and how can I conclude it with my file?
– Leonardo
Jan 19 '17 at 18:48
aha, okay, so you mean that because I had not done it on university computer that's why it did not. Okay, now my question is, what should I do so that I will not have to run chmod u+x on university computer? where is the executable bit and how can I conclude it with my file?
– Leonardo
Jan 19 '17 at 18:48
|
show 6 more comments
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f338680%2fexecutable-file-problem-after-transfer-to-other-system%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
How did you transfer the file from your laptop to the university computer?
– Timothy Martin
Jan 19 '17 at 18:20
@TimothyMartin I had it uploaded on my google drive and downloaded from there on university computer
– Leonardo
Jan 19 '17 at 18:21