“No such file or directory” even though the file is listed with ls
up vote
3
down vote
favorite
I have reinstalled and installed Ubuntu 3 times now. I'm writing a gforth program for the school. I have installed gforth and it runs just fine. I've written a file to save my program in. In the given directory and I use ls
, the file is listed. However, if I use the command gforth filename.fs
, I get *OS command line*:-1: No such file or directory
followed by a few lines of a backtrace. Trying to include the file while in gforth creates a similar result. Even when I try vim filename.fs
, I get a blank file. Creating new files with vim also doesn't work. After I exit vim and save, the file is nowhere to be found. Please help.
command-line permissions
|
show 1 more comment
up vote
3
down vote
favorite
I have reinstalled and installed Ubuntu 3 times now. I'm writing a gforth program for the school. I have installed gforth and it runs just fine. I've written a file to save my program in. In the given directory and I use ls
, the file is listed. However, if I use the command gforth filename.fs
, I get *OS command line*:-1: No such file or directory
followed by a few lines of a backtrace. Trying to include the file while in gforth creates a similar result. Even when I try vim filename.fs
, I get a blank file. Creating new files with vim also doesn't work. After I exit vim and save, the file is nowhere to be found. Please help.
command-line permissions
You sure you didn't put a space or similar invisible character in the filename?
– muru
Sep 11 at 2:59
Yeah, the filename has no spaces or anything, it's literally program.fs
– ScottyD
Sep 11 at 3:11
Are you in the same directory as the file when you callgforth
? Trygforth ./program.fs
– Sergiy Kolodyazhnyy
Sep 11 at 3:35
That resulted in almost the exact same thing, except instead of sayingNo such file or directory
it now saysPermission denied
. I thought I've been running as the administrator, but I don't know if that even has anything to do with this.
– ScottyD
Sep 11 at 3:38
Go to the directory and runnamei -lx *
, and add the output please.
– muru
Sep 11 at 3:52
|
show 1 more comment
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I have reinstalled and installed Ubuntu 3 times now. I'm writing a gforth program for the school. I have installed gforth and it runs just fine. I've written a file to save my program in. In the given directory and I use ls
, the file is listed. However, if I use the command gforth filename.fs
, I get *OS command line*:-1: No such file or directory
followed by a few lines of a backtrace. Trying to include the file while in gforth creates a similar result. Even when I try vim filename.fs
, I get a blank file. Creating new files with vim also doesn't work. After I exit vim and save, the file is nowhere to be found. Please help.
command-line permissions
I have reinstalled and installed Ubuntu 3 times now. I'm writing a gforth program for the school. I have installed gforth and it runs just fine. I've written a file to save my program in. In the given directory and I use ls
, the file is listed. However, if I use the command gforth filename.fs
, I get *OS command line*:-1: No such file or directory
followed by a few lines of a backtrace. Trying to include the file while in gforth creates a similar result. Even when I try vim filename.fs
, I get a blank file. Creating new files with vim also doesn't work. After I exit vim and save, the file is nowhere to be found. Please help.
command-line permissions
command-line permissions
edited Sep 11 at 7:04
NIMISHAN
83521119
83521119
asked Sep 11 at 2:54
ScottyD
161
161
You sure you didn't put a space or similar invisible character in the filename?
– muru
Sep 11 at 2:59
Yeah, the filename has no spaces or anything, it's literally program.fs
– ScottyD
Sep 11 at 3:11
Are you in the same directory as the file when you callgforth
? Trygforth ./program.fs
– Sergiy Kolodyazhnyy
Sep 11 at 3:35
That resulted in almost the exact same thing, except instead of sayingNo such file or directory
it now saysPermission denied
. I thought I've been running as the administrator, but I don't know if that even has anything to do with this.
– ScottyD
Sep 11 at 3:38
Go to the directory and runnamei -lx *
, and add the output please.
– muru
Sep 11 at 3:52
|
show 1 more comment
You sure you didn't put a space or similar invisible character in the filename?
– muru
Sep 11 at 2:59
Yeah, the filename has no spaces or anything, it's literally program.fs
– ScottyD
Sep 11 at 3:11
Are you in the same directory as the file when you callgforth
? Trygforth ./program.fs
– Sergiy Kolodyazhnyy
Sep 11 at 3:35
That resulted in almost the exact same thing, except instead of sayingNo such file or directory
it now saysPermission denied
. I thought I've been running as the administrator, but I don't know if that even has anything to do with this.
– ScottyD
Sep 11 at 3:38
Go to the directory and runnamei -lx *
, and add the output please.
– muru
Sep 11 at 3:52
You sure you didn't put a space or similar invisible character in the filename?
– muru
Sep 11 at 2:59
You sure you didn't put a space or similar invisible character in the filename?
– muru
Sep 11 at 2:59
Yeah, the filename has no spaces or anything, it's literally program.fs
– ScottyD
Sep 11 at 3:11
Yeah, the filename has no spaces or anything, it's literally program.fs
– ScottyD
Sep 11 at 3:11
Are you in the same directory as the file when you call
gforth
? Try gforth ./program.fs
– Sergiy Kolodyazhnyy
Sep 11 at 3:35
Are you in the same directory as the file when you call
gforth
? Try gforth ./program.fs
– Sergiy Kolodyazhnyy
Sep 11 at 3:35
That resulted in almost the exact same thing, except instead of saying
No such file or directory
it now says Permission denied
. I thought I've been running as the administrator, but I don't know if that even has anything to do with this.– ScottyD
Sep 11 at 3:38
That resulted in almost the exact same thing, except instead of saying
No such file or directory
it now says Permission denied
. I thought I've been running as the administrator, but I don't know if that even has anything to do with this.– ScottyD
Sep 11 at 3:38
Go to the directory and run
namei -lx *
, and add the output please.– muru
Sep 11 at 3:52
Go to the directory and run
namei -lx *
, and add the output please.– muru
Sep 11 at 3:52
|
show 1 more comment
1 Answer
1
active
oldest
votes
up vote
1
down vote
The output of namei
shows what the problem is: your file exists, but has permissions ----------
, meaning it is neither readable, writable nor executable by anyone, including the user who owns the file. Try:
chmod u+rw program.fs
The command ls -l program.fs
should then show something like
-rw------- 1 username username 0 Nov 22 14:21 program.fs
The rw
means that you have given yourself permission to read and write this file. See e.g. https://www.tutorialspoint.com/unix/unix-file-permission.htm for more info.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
The output of namei
shows what the problem is: your file exists, but has permissions ----------
, meaning it is neither readable, writable nor executable by anyone, including the user who owns the file. Try:
chmod u+rw program.fs
The command ls -l program.fs
should then show something like
-rw------- 1 username username 0 Nov 22 14:21 program.fs
The rw
means that you have given yourself permission to read and write this file. See e.g. https://www.tutorialspoint.com/unix/unix-file-permission.htm for more info.
add a comment |
up vote
1
down vote
The output of namei
shows what the problem is: your file exists, but has permissions ----------
, meaning it is neither readable, writable nor executable by anyone, including the user who owns the file. Try:
chmod u+rw program.fs
The command ls -l program.fs
should then show something like
-rw------- 1 username username 0 Nov 22 14:21 program.fs
The rw
means that you have given yourself permission to read and write this file. See e.g. https://www.tutorialspoint.com/unix/unix-file-permission.htm for more info.
add a comment |
up vote
1
down vote
up vote
1
down vote
The output of namei
shows what the problem is: your file exists, but has permissions ----------
, meaning it is neither readable, writable nor executable by anyone, including the user who owns the file. Try:
chmod u+rw program.fs
The command ls -l program.fs
should then show something like
-rw------- 1 username username 0 Nov 22 14:21 program.fs
The rw
means that you have given yourself permission to read and write this file. See e.g. https://www.tutorialspoint.com/unix/unix-file-permission.htm for more info.
The output of namei
shows what the problem is: your file exists, but has permissions ----------
, meaning it is neither readable, writable nor executable by anyone, including the user who owns the file. Try:
chmod u+rw program.fs
The command ls -l program.fs
should then show something like
-rw------- 1 username username 0 Nov 22 14:21 program.fs
The rw
means that you have given yourself permission to read and write this file. See e.g. https://www.tutorialspoint.com/unix/unix-file-permission.htm for more info.
answered Nov 22 at 18:26
Peter Selinger
262
262
add a comment |
add a comment |
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%2faskubuntu.com%2fquestions%2f1074139%2fno-such-file-or-directory-even-though-the-file-is-listed-with-ls%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
You sure you didn't put a space or similar invisible character in the filename?
– muru
Sep 11 at 2:59
Yeah, the filename has no spaces or anything, it's literally program.fs
– ScottyD
Sep 11 at 3:11
Are you in the same directory as the file when you call
gforth
? Trygforth ./program.fs
– Sergiy Kolodyazhnyy
Sep 11 at 3:35
That resulted in almost the exact same thing, except instead of saying
No such file or directory
it now saysPermission denied
. I thought I've been running as the administrator, but I don't know if that even has anything to do with this.– ScottyD
Sep 11 at 3:38
Go to the directory and run
namei -lx *
, and add the output please.– muru
Sep 11 at 3:52