It is possible that the "read-only" attribute is set; type "attrib enwiki.bz2"
to display the file attributes. If you see "R" then it is a read-only file.
You can remove the attribute by typing "attrib -r enwiki.bz2" if required.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It really shouldn't matter whether the read-only attribute is set for the
input file (enwiki.bz2), or not. That shouldn't raise a "permission denied"
exception. However, if the output file (enwiki) already exists, and it has
the read-only attribute, then that would raise this exception. Another
possibility is that the OP doesn't have write permission for the directory in
which he/she is trying to save the output file(s).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In the documentation it mentions the "-k" switch which might help. There is no
need to change the file attribute of the input file in this case. (On Windows
a read-only file normally cannot be deleted without asking for confirmation.)
... However, if the output file (enwiki) already exists, and it has the
read-only attribute, then that would raise this exception. Another possibility
is that the OP doesn't have write permission for the directory in which he/she
is trying to save the output file(s).
If the output file already exists then the OP might have received a different
error message such as
"bunzip2: Output file enwiki already exists.".
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry, I was forgetting that gzip, bzip2, lzma, xz and friends default to
compressing/decompressing in place, (i.e. overwriting the original file with
the compressed/decompressed content). In that case, for transformation in
either direction, of course the original file needs to be writeable, so it can
be removed after successful conversion.
I always use these tools in the stdout redirecting form, e.g.:
bunzip2 -c enwiki.bz2 > enwiki
so the issue doesn't arise, (and I don't lose the original file). I guess your
-k option has a similar effect.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Iappreciateyourreplies...
Youwereright,theOPdoesn't have permission for the directory in which I was trying to save the output file... I used another directory and it worked...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I tried to use the bunzip2 command from the "Command Prompt" and I had the
following message:
bunzip2: I/O or other error, bailing out. Possible reason follows.
bunzip2: Permission denied
Input file = enwiki.bz2, output file = enwiki
It is possible that the "read-only" attribute is set; type "attrib enwiki.bz2"
to display the file attributes. If you see "R" then it is a read-only file.
You can remove the attribute by typing "attrib -r enwiki.bz2" if required.
It really shouldn't matter whether the read-only attribute is set for the
input file (enwiki.bz2), or not. That shouldn't raise a "permission denied"
exception. However, if the output file (enwiki) already exists, and it has
the read-only attribute, then that would raise this exception. Another
possibility is that the OP doesn't have write permission for the directory in
which he/she is trying to save the output file(s).
In the documentation it mentions the "-k" switch which might help. There is no
need to change the file attribute of the input file in this case. (On Windows
a read-only file normally cannot be deleted without asking for confirmation.)
If the output file already exists then the OP might have received a different
error message such as
"bunzip2: Output file enwiki already exists.".
Sorry, I was forgetting that gzip, bzip2, lzma, xz and friends default to
compressing/decompressing in place, (i.e. overwriting the original file with
the compressed/decompressed content). In that case, for transformation in
either direction, of course the original file needs to be writeable, so it can
be removed after successful conversion.
I always use these tools in the stdout redirecting form, e.g.:
bunzip2 -c enwiki.bz2 > enwiki
so the issue doesn't arise, (and I don't lose the original file). I guess your
-k option has a similar effect.
Thank you very much...