Установил на Ubuntu 15.04 Geany версии 1.25.
При попытке сохранения файла выскакивает ошибка, как на скриншоте ниже. Подскажите, как можно пофиксить это.
Заранее благодарю.

задан 18 окт 2015 в 16:20
![]()
2
вероятно, каталог и файлы, в которые вы пытаетесь внести изменения, принадлежат другому пользователю.
один из возможных вариантов «решения» — изменить принадлежность этих файлов/каталогов:
$ sudo chown $USER /путь/к/файлу/и/или/каталогу ...
или рекурсивно для всего содержимого каталога:
$ sudo chown -R $USER /путь/к/каталогу ...
ответ дан 18 окт 2015 в 20:19
![]()
aleksandr barakinaleksandr barakin
67.5k200 золотых знаков74 серебряных знака216 бронзовых знаков
В настоящее время я начинаю изучать Python в Windows 10, и для этого я установил Geany 1.34.1 и Python 3.7.2 (с параметром PATH), как указано в моей книге.
Затем я создал новый файл и попытался сохранить его в какой-то папке на моем диске C:, где находятся оба программного обеспечения.
К сожалению, я получаю следующую ошибку
Перевод (оригинал частично на французском):
«Ошибка при сохранении файла. Не удалось открыть файл «C:UsersXXXDocumentspython_worktest.py» для записи: fopen() не удалось: нет такого файла или каталога. Файл на диске может быть усеченный»
Я также пытался использовать Python IDLE и столкнулся с той же проблемой, когда не могу сохранить свой файл.
Я читал, что это может быть связано с тем, что в WIN мы используем , а в Unix /, но я действительно не знаю, почему Geany не может сделать перевод в одиночку.
Кто-нибудь может объяснить причину такого поведения после нескольких часов ударов и промахов?
Edit1: Транскрипция и перевод ошибки
Перейти к ответу
Данный вопрос помечен как решенный
Ответы
2
Я думаю, это потому, что в python и других языках программирования «» используется для некоторых специальных символов.
Например ‘n’ = новая строка
Я не совсем уверен, но я думаю, что именно по этой причине у меня были похожие проблемы в начале.
Нашел проблему.
Убедитесь, что следующие деактивированы:
Защитник Windows > Защита от вирусов и угроз > Настройки защиты от вирусов и угроз > Контролируемый доступ к папкам > Отключено
Другие вопросы по теме
В течение многих лет я всегда использовал Geany IDE для всех типов кода на Windows или Linux и был очень проверен.
Но затем я решил использовать более свежую версию, и странная проблема появилась в последней версии выпуска для Windows (в настоящее время 1.23.1, в Windows 7 Home Edition SP1). Всякий раз, когда я пытаюсь сохранить или создать новый файл в папке Desktop, и пока только в этой папке и подпапках, происходит сбой с этой ошибкой:

Что я пробовал:
- Создать + сохранить файлы вокруг папки, такие как AppData, .config, случайные папки на другом диске и т.д. (Работает должным образом);
- Сравните разрешения между этими положениями, чтобы не найти ничего явно различного;
- Глядя на Инструменты> Сообщения отладки (там написано: «Не удалось найти файл ‘C% 3A% 5CUsers% 5Cusername% 5CDesktop% 5filename.ext’.», Но он действительно может прочитать файл)
- Добавление конкретно разрешения пользователю «Аутентифицированные пользователи»;
Есть что-то, чего я здесь не хватает? Может ли это быть проблемой, появившейся в недавней версии Geany? Любой обходной путь или идея о том, что может быть не так в моей конфигурации? Я использовал версию 0.21, если я правильно помню, и впервые сталкиваюсь с этой проблемой. Я также искал на многих форумах, чтобы найти ничего, связанного с этой конкретной папкой в Windows с Geany.
Любая помощь приветствуется, спасибо!
ОБНОВИТЬ:
Я вернулся к выпуску версии 0.21, и все работает как положено. Очевидно, в последнем есть что-то другое, что я пока не могу понять.
I’m using Geany 1.30.1 on Windows 7.
After happily editing a file over some time, suddenly Geany refuses to save it with this error message:

I know that Windows sometimes grabs a lock on a file when I’m just looking at it with another tool, but I am pretty sure that the only way I’m operating on this file since the last bootup of my machine, is by editing it in Geany. Still, for the safe side, I run the Handle utility to see whether someone has a handle to either the file or the directory where the file is in — nothing. I also used Geany’s «File/Properties» to check, whether maybe the file secretly became readonly; this is also not the case. Finally I turned on the gio_unsafe_save_backup and tried again, but same result. Note that it is a local file, so there can’t be network issues involved either.
Then I tried «save as» with «rename», to store it under a new name in the same directory. This was refused with the same error message. I could see that the file got renamed, but still had the old content. This is weird: If the cause would be a directory lock, the rename should ALSO have failed.
Needless to say that it is not a disk space problem either.
I resolved the problem temporarily by using the following strategy:
- Using «Save as» to save it to a completely different directory.
- Copying the file back (on the command line)
- Closing the Buffer in Geany
- Reopening it
I then checked with my remaining open files in Geany. Modifying the buffer and saving, caused the same error with two of the files, while it worked fine with two others. One of the two where the error occured too, belonged to a different directory, while all the others — including those which could be saved — belonged to the same directory as the file where the problem occured initially.
I don’t see yet in what respect the two files which did not have the problem, differed significantly from the two files where the problem occured.
Closing Geany, starting it, and I can continue editing like normal, but my feeling is that it will be only a question of time until the problem occurs again. Is there anything I can do to help the Geany developers to nail down the cause of this strange problem?
I am not a windows expert, but a couple of questions/suggestions.
The number one is, are you running any plugins? And if you are, does the problem occur when you run with no plugins?
I presume you retried the save and the «permission denied» continued after you had checked that nobody had a handle on the file?
Are you using windows native dialogs or GTK dialogs? And does the problem occur when you try the other? I vaguely remember something about dialogs having locks on files or directories because they read the metadata to populate the dialog.
IIRC the gio_unsafe_save_backup needs use_gio_unsafe_file_saving set as well.
Does the problem occur if you have neither use_atomic_file_saving nor use_gio_unsafe_file_saving nor gio_unsafe_save_backup set?
(1) The number one is, are you running any plugins?
I’m not aware of. I have installed Geany today, and did not fiddle around with Plugins. Of course, it might be that Geany, out of the box, uses some Plugins which need to be disabled. In any case, the settings have a checkmark in «use plugins». If the pane which shows the map of my functions, is displayed by a plugin, then I would conclude that at least this plugin is running alongside.
(2) I presume you retried the save and the «permission denied» continued after you had checked that nobody had a handle on the file?
Of course, and, as I said, I for sure did not do anything with this file from a different program. Plus, the error occured on 3 files out of 5. And, I could save these files earlier in the same edit session.
(3) Are you using windows native dialogs or GTK dialogs?
They are GTK dialogs. I have now changed the settings to use Windows dialogues, but honestly, I like the GTK ones better.
(4) Does the problem occur if you have neither use_atomic_file_saving nor use_gio_unsafe_file_saving nor gio_unsafe_save_backup set?
Yes, the other ones were disabled as well, but this didn’t have any influence.
I wonder whether the problem might be related to a temporary directory or backup directory. Is Geany using some of them under the hood, maybe in my Windows Profile Data space? This is certainly an area which Geany should better keep its fingers off….
ADDITIONAL NOTE: After continuing to edit my files (after restarting Geany) for maybe 15 minutes, the error occured again. It is not possible to save the file.
Unfortunately, this version of Geany is not usable for me. I will therefore switch to a different editor, BUTif one of the Geany maintainers wants me to try out something, I will of course turn back to Geany, because I want to help to find the bug.
I have installed Geany today, and did not fiddle around with Plugins.
Ok, if its a new install and you didn’t enable any plugins in Tools->Plugin Manager then there should be none running, but maybe just check none are enabled in plugin manager.
Of course, and, as I said, I for sure did not do anything with this file from a different program. Plus, the error occured on 3 files out of 5. And, I could save these files earlier in the same edit session.
Thats fine, we have to check the obvious first 🙂
I have now changed the settings to use Windows dialogues, but honestly, I like the GTK ones better.
Let us know if the problem still occurs, the GTK dialogs are not something we build so I don’t know what they do, but I know they run extra threads, so maybe they trawl the filesystem to pre-load the dialogs, and I think I remember somewhere reports of them holding locks on stuff.
I wonder whether the problem might be related to a temporary directory or backup directory.
Other than its config directory that is saved in your user data (see Help->Debug Messages 4-5 down says where) Geany itself doesn’t fiddle with files other than your explicit save and load, but some plugins do, hence the first question.
Unfortunately, this version of Geany is not usable for me. I will therefore switch to a different editor, BUTif one of the Geany maintainers wants me to try out something, I will of course turn back to Geany, because I want to help to find the bug.
I presume that means the windows dialogs didn’t help 🙁
I know that there are some who use Geany on windows without problems, not sure if its 7 though, think its 10. Maybe they can provide some more suggestions on that might be unusual about your system.
I presume that means the windows dialogs didn’t help 🙁
This is correct.
If someone could provide me a special, instrumented version, which logs what is going on during saving, I could run it until the problem occurs again, and then send the logs.
I use it on Windows 7 and Windows 10 without this problem. All files I edit are local on the disk and both machines have my one user as an administrator. Not sure it helps.
Edit: Also both systems use all US-English locales and no files with non-ASCII filenames.
Edit2: Also I don’t use/have Cygwin at all, just using the offical Geany releases from the website.
Just for some rainy day reading see my PHD thesis on saving files in Geany on the wiki.
If someone could provide me a special, instrumented version, which logs what is going on during saving, I could run it until the problem occurs again, and then send the logs.
As the wiki article says, two of the three saving methods are from libraries that we don’t control, so there is not much that can be done to see what is going on there. The third saving method is so simple that there is nothing to log, it exits on the first error and gives you a failure dialog.
The error message in German in your OP does not seem to be one of ours, suggesting that you were running one of the library saving methods when that occurred. Our message says «Failed to open file ‘%s’ for writing: fopen() failed: %s», and the German translation also contains the «fopen()» part which is missing in the dialog you posted. Please make very sure that you have all three of the options use_atomic_file_saving and use_gio_unsafe_file_saving and gio_unsafe_save_backup turned off.
Finally thank you for continuing to help track the problem down, as you understand, until we can replicate it we can’t do anything to fix it.
I am new to geany, and I use it to update html and php files for my server, and I ran into the same issue. I searched online and no luck, then I tried the
«sudo chmod 775 filename.xxx» (xxx could stand for php, js, or whatever type of file).
This allowed the file to execute when being called from the browser. I was also able to
«sudo nano filename.xxx»
So i decided to try the command «sudo geany» which prompted for my password as usual when you use sudo and it worked. I was able to save.
So using the command geany assumes you’re logged in as root, and if you are, you shouldn’t have permission issues, but if not, you need to «sudo » into geany
«sudo nano filename.xxx»
If you have to sudo to edit the file you have your protections wrong, you need to fix them, not override them by running editors as root.
To be clear, the Geany team does NOT recommend running Geany as root, it is an IDE and some of the things it does as part of a normal development cycle may be security or other risks when run as root. You have been warned and you are responsible for any damage that may occur.
«sudo nano filename.xxx»
I don’t agree with the avoid-root-at-all-cost paranoia, but you can minimize the «danger» by running the editor as the actual user that owns the file with sudo -u. You can also avoid creating a new file with wrong ownership.
So using the command geany assumes you’re logged in as root, and if you are, you shouldn’t have permission issues, but if not, you need to «sudo » into geany
So what exactly was the issue?
I know this is old, but for the people coming here to fix the problem for themselves. You’re probably saving in the «Geany» folder and trying to execute your file out of the folder. Try saving your file on your desktop.
I have the same issue on network drives that I created with Win-SSHFS on Windows 10 and only in cases where the file already exist. The problem does not arise with other editors.
Geany 1.36
Hello,
I have just experienced the same problem today (after years of using Geany seamlessly). Can this be related to the fact that I have tried to input Unicode characters like «É» just before (unsuccessfully, by the way…), which I think I had never done before?
At each attempt of file saving, I get a new file named .goutputstream-XXXXXX instead, with the content of the file I am trying to save.
Yours,
Maxime
@MaximeG-51 when you say «input unicode characters» do you mean in the file contents or the filename?
Hi,
In the file contents. I tried to type Éduterre. The «Alt-144» method I use in other Windows applications did not work, so I tried the Ctrl-Shift-u method described in the Geany Help, to no success. The file name does not contain any accented character (not even those that are directly on my French keyboard).
Yours,
Maxime
Typing characters into the file is not part of this issue, if it failed to include the character it can have no effect on saving the file, but if you did manage to include it, and the Locale can’t store it in the file encoding, then save will fail, but with a different message to that which this issues is about.
I suggest you start a new issue and provide full system details and messages.
I’m using Geany 1.30.1 on Windows 7.
After happily editing a file over some time, suddenly Geany refuses to save it with this error message:

I know that Windows sometimes grabs a lock on a file when I’m just looking at it with another tool, but I am pretty sure that the only way I’m operating on this file since the last bootup of my machine, is by editing it in Geany. Still, for the safe side, I run the Handle utility to see whether someone has a handle to either the file or the directory where the file is in — nothing. I also used Geany’s «File/Properties» to check, whether maybe the file secretly became readonly; this is also not the case. Finally I turned on the gio_unsafe_save_backup and tried again, but same result. Note that it is a local file, so there can’t be network issues involved either.
Then I tried «save as» with «rename», to store it under a new name in the same directory. This was refused with the same error message. I could see that the file got renamed, but still had the old content. This is weird: If the cause would be a directory lock, the rename should ALSO have failed.
Needless to say that it is not a disk space problem either.
I resolved the problem temporarily by using the following strategy:
- Using «Save as» to save it to a completely different directory.
- Copying the file back (on the command line)
- Closing the Buffer in Geany
- Reopening it
I then checked with my remaining open files in Geany. Modifying the buffer and saving, caused the same error with two of the files, while it worked fine with two others. One of the two where the error occured too, belonged to a different directory, while all the others — including those which could be saved — belonged to the same directory as the file where the problem occured initially.
I don’t see yet in what respect the two files which did not have the problem, differed significantly from the two files where the problem occured.
Closing Geany, starting it, and I can continue editing like normal, but my feeling is that it will be only a question of time until the problem occurs again. Is there anything I can do to help the Geany developers to nail down the cause of this strange problem?
I am not a windows expert, but a couple of questions/suggestions.
The number one is, are you running any plugins? And if you are, does the problem occur when you run with no plugins?
I presume you retried the save and the «permission denied» continued after you had checked that nobody had a handle on the file?
Are you using windows native dialogs or GTK dialogs? And does the problem occur when you try the other? I vaguely remember something about dialogs having locks on files or directories because they read the metadata to populate the dialog.
IIRC the gio_unsafe_save_backup needs use_gio_unsafe_file_saving set as well.
Does the problem occur if you have neither use_atomic_file_saving nor use_gio_unsafe_file_saving nor gio_unsafe_save_backup set?
(1) The number one is, are you running any plugins?
I’m not aware of. I have installed Geany today, and did not fiddle around with Plugins. Of course, it might be that Geany, out of the box, uses some Plugins which need to be disabled. In any case, the settings have a checkmark in «use plugins». If the pane which shows the map of my functions, is displayed by a plugin, then I would conclude that at least this plugin is running alongside.
(2) I presume you retried the save and the «permission denied» continued after you had checked that nobody had a handle on the file?
Of course, and, as I said, I for sure did not do anything with this file from a different program. Plus, the error occured on 3 files out of 5. And, I could save these files earlier in the same edit session.
(3) Are you using windows native dialogs or GTK dialogs?
They are GTK dialogs. I have now changed the settings to use Windows dialogues, but honestly, I like the GTK ones better.
(4) Does the problem occur if you have neither use_atomic_file_saving nor use_gio_unsafe_file_saving nor gio_unsafe_save_backup set?
Yes, the other ones were disabled as well, but this didn’t have any influence.
I wonder whether the problem might be related to a temporary directory or backup directory. Is Geany using some of them under the hood, maybe in my Windows Profile Data space? This is certainly an area which Geany should better keep its fingers off….
ADDITIONAL NOTE: After continuing to edit my files (after restarting Geany) for maybe 15 minutes, the error occured again. It is not possible to save the file.
Unfortunately, this version of Geany is not usable for me. I will therefore switch to a different editor, BUTif one of the Geany maintainers wants me to try out something, I will of course turn back to Geany, because I want to help to find the bug.
I have installed Geany today, and did not fiddle around with Plugins.
Ok, if its a new install and you didn’t enable any plugins in Tools->Plugin Manager then there should be none running, but maybe just check none are enabled in plugin manager.
Of course, and, as I said, I for sure did not do anything with this file from a different program. Plus, the error occured on 3 files out of 5. And, I could save these files earlier in the same edit session.
Thats fine, we have to check the obvious first 🙂
I have now changed the settings to use Windows dialogues, but honestly, I like the GTK ones better.
Let us know if the problem still occurs, the GTK dialogs are not something we build so I don’t know what they do, but I know they run extra threads, so maybe they trawl the filesystem to pre-load the dialogs, and I think I remember somewhere reports of them holding locks on stuff.
I wonder whether the problem might be related to a temporary directory or backup directory.
Other than its config directory that is saved in your user data (see Help->Debug Messages 4-5 down says where) Geany itself doesn’t fiddle with files other than your explicit save and load, but some plugins do, hence the first question.
Unfortunately, this version of Geany is not usable for me. I will therefore switch to a different editor, BUTif one of the Geany maintainers wants me to try out something, I will of course turn back to Geany, because I want to help to find the bug.
I presume that means the windows dialogs didn’t help 🙁
I know that there are some who use Geany on windows without problems, not sure if its 7 though, think its 10. Maybe they can provide some more suggestions on that might be unusual about your system.
I presume that means the windows dialogs didn’t help 🙁
This is correct.
If someone could provide me a special, instrumented version, which logs what is going on during saving, I could run it until the problem occurs again, and then send the logs.
I use it on Windows 7 and Windows 10 without this problem. All files I edit are local on the disk and both machines have my one user as an administrator. Not sure it helps.
Edit: Also both systems use all US-English locales and no files with non-ASCII filenames.
Edit2: Also I don’t use/have Cygwin at all, just using the offical Geany releases from the website.
Just for some rainy day reading see my PHD thesis on saving files in Geany on the wiki.
If someone could provide me a special, instrumented version, which logs what is going on during saving, I could run it until the problem occurs again, and then send the logs.
As the wiki article says, two of the three saving methods are from libraries that we don’t control, so there is not much that can be done to see what is going on there. The third saving method is so simple that there is nothing to log, it exits on the first error and gives you a failure dialog.
The error message in German in your OP does not seem to be one of ours, suggesting that you were running one of the library saving methods when that occurred. Our message says «Failed to open file ‘%s’ for writing: fopen() failed: %s», and the German translation also contains the «fopen()» part which is missing in the dialog you posted. Please make very sure that you have all three of the options use_atomic_file_saving and use_gio_unsafe_file_saving and gio_unsafe_save_backup turned off.
Finally thank you for continuing to help track the problem down, as you understand, until we can replicate it we can’t do anything to fix it.
I am new to geany, and I use it to update html and php files for my server, and I ran into the same issue. I searched online and no luck, then I tried the
«sudo chmod 775 filename.xxx» (xxx could stand for php, js, or whatever type of file).
This allowed the file to execute when being called from the browser. I was also able to
«sudo nano filename.xxx»
So i decided to try the command «sudo geany» which prompted for my password as usual when you use sudo and it worked. I was able to save.
So using the command geany assumes you’re logged in as root, and if you are, you shouldn’t have permission issues, but if not, you need to «sudo » into geany
«sudo nano filename.xxx»
If you have to sudo to edit the file you have your protections wrong, you need to fix them, not override them by running editors as root.
To be clear, the Geany team does NOT recommend running Geany as root, it is an IDE and some of the things it does as part of a normal development cycle may be security or other risks when run as root. You have been warned and you are responsible for any damage that may occur.
«sudo nano filename.xxx»
I don’t agree with the avoid-root-at-all-cost paranoia, but you can minimize the «danger» by running the editor as the actual user that owns the file with sudo -u. You can also avoid creating a new file with wrong ownership.
So using the command geany assumes you’re logged in as root, and if you are, you shouldn’t have permission issues, but if not, you need to «sudo » into geany
So what exactly was the issue?
I know this is old, but for the people coming here to fix the problem for themselves. You’re probably saving in the «Geany» folder and trying to execute your file out of the folder. Try saving your file on your desktop.
I have the same issue on network drives that I created with Win-SSHFS on Windows 10 and only in cases where the file already exist. The problem does not arise with other editors.
Geany 1.36
Hello,
I have just experienced the same problem today (after years of using Geany seamlessly). Can this be related to the fact that I have tried to input Unicode characters like «É» just before (unsuccessfully, by the way…), which I think I had never done before?
At each attempt of file saving, I get a new file named .goutputstream-XXXXXX instead, with the content of the file I am trying to save.
Yours,
Maxime
@MaximeG-51 when you say «input unicode characters» do you mean in the file contents or the filename?
Hi,
In the file contents. I tried to type Éduterre. The «Alt-144» method I use in other Windows applications did not work, so I tried the Ctrl-Shift-u method described in the Geany Help, to no success. The file name does not contain any accented character (not even those that are directly on my French keyboard).
Yours,
Maxime
Typing characters into the file is not part of this issue, if it failed to include the character it can have no effect on saving the file, but if you did manage to include it, and the Locale can’t store it in the file encoding, then save will fail, but with a different message to that which this issues is about.
I suggest you start a new issue and provide full system details and messages.
I have a text file that I can change using other applications (for example openoffice). But when I try to change and save it using gedit, I am getting error from gedit:
Could not save the file /media/sf_Ubuntu/BuildNotes.txt.
Unexpected error: Error renaming temporary file: Text file busy
the permission of BuildNotes.txt is as follow:
-rwxrwx--- 1 root vboxsf 839 2012-10-26 12:08 BuildNotes.txt
and user id is:
m@m-Linux:/media/sf_Ubuntu$ id
uid=1000(m) gid=1000(m) groups=4(adm),20(dialout),24(cdrom),46(plugdev),105(lpadmin),119(admin),122(sambashare),1000(m),1001(vboxsf)
What is the problem and how I can fix it?
Anthon
76.9k42 gold badges159 silver badges217 bronze badges
asked Oct 26, 2012 at 11:15
3
This problem has been reported since 2009 (example [archived]). It is awful that there’s no fix for it yet. Neither VirtualBox nor Gedit developers are willing to take responsibility for it, and instead are content to point fingers at one another for over three years.
You can set your editor preferences to ‘Create a backup’ then save twice. Incredibly painful, but it works.
Some other editors won’t report the problem. However, when I tested Kate and nano, for example, those just silently deleted the file on every other save. That’s even worse than the gedit situation…
![]()
answered Nov 8, 2012 at 1:50
DavidDavid
2411 silver badge3 bronze badges
6
“Text file busy” can be confusing here: it isn’t actually about text files, but about executables. Executables are called text files because… hum, actually, I don’t know why.
What the message really means is “this file is locked by another program that is using it and can’t let it be modified under its nose, so you can’t write to it.” It is quite unusual to see this message for a text file: unix systems generally frown on mandatory locks on files, and there is no facility for applications to lock out others from modifying a file. (Unix has advisory locks: they can be used to synchronize concurrent accesses to a file by cooperating programs.) The most common circumstance when you’ll see “text file busy” (ETXTBUSY) is if you try to modify an executable that’s running: the kernel locks it. Another possibility is a disk image that is mounted, again locked by the kernel.
In your case, given the location of the file /media/sf_Ubuntu and the ownership to the group vboxsf, my guess is that the file, which is on a VirtualBox file sharing filesystem, is locked in the host operating system. Presumably the host is a Windows machine and you also have the file open in an editor there. You’ll need to close the file on the host before you can save in the editor in the VM.
answered Oct 26, 2012 at 23:30
![]()
2
Check with lsof if the file is open by another application
lsof /media/sf_Ubuntu/BuildNotes.txt
Or use fuser:
fuser -km /media/sf_Ubuntu/BuildNotes.txt
![]()
Mat
50.6k10 gold badges154 silver badges139 bronze badges
answered Oct 26, 2012 at 12:20
What fixed it for me (still a bit annoying but works), and is applicable to gedit, is to:
edit — preferences — editor
Put a check on «Create backup copy»
When saving from now on, save the file once, ignore the error, save again.
works every time.
answered Nov 12, 2013 at 15:21
1
using linux terminal, try editing the file using vi file_name and save it.
p.s I could not find another solution for this issue. vi worked
answered Sep 22, 2017 at 2:46
I have a text file that I can change using other applications (for example openoffice). But when I try to change and save it using gedit, I am getting error from gedit:
Could not save the file /media/sf_Ubuntu/BuildNotes.txt.
Unexpected error: Error renaming temporary file: Text file busy
the permission of BuildNotes.txt is as follow:
-rwxrwx--- 1 root vboxsf 839 2012-10-26 12:08 BuildNotes.txt
and user id is:
m@m-Linux:/media/sf_Ubuntu$ id
uid=1000(m) gid=1000(m) groups=4(adm),20(dialout),24(cdrom),46(plugdev),105(lpadmin),119(admin),122(sambashare),1000(m),1001(vboxsf)
What is the problem and how I can fix it?
Anthon
76.9k42 gold badges159 silver badges217 bronze badges
asked Oct 26, 2012 at 11:15
3
This problem has been reported since 2009 (example [archived]). It is awful that there’s no fix for it yet. Neither VirtualBox nor Gedit developers are willing to take responsibility for it, and instead are content to point fingers at one another for over three years.
You can set your editor preferences to ‘Create a backup’ then save twice. Incredibly painful, but it works.
Some other editors won’t report the problem. However, when I tested Kate and nano, for example, those just silently deleted the file on every other save. That’s even worse than the gedit situation…
![]()
answered Nov 8, 2012 at 1:50
DavidDavid
2411 silver badge3 bronze badges
6
“Text file busy” can be confusing here: it isn’t actually about text files, but about executables. Executables are called text files because… hum, actually, I don’t know why.
What the message really means is “this file is locked by another program that is using it and can’t let it be modified under its nose, so you can’t write to it.” It is quite unusual to see this message for a text file: unix systems generally frown on mandatory locks on files, and there is no facility for applications to lock out others from modifying a file. (Unix has advisory locks: they can be used to synchronize concurrent accesses to a file by cooperating programs.) The most common circumstance when you’ll see “text file busy” (ETXTBUSY) is if you try to modify an executable that’s running: the kernel locks it. Another possibility is a disk image that is mounted, again locked by the kernel.
In your case, given the location of the file /media/sf_Ubuntu and the ownership to the group vboxsf, my guess is that the file, which is on a VirtualBox file sharing filesystem, is locked in the host operating system. Presumably the host is a Windows machine and you also have the file open in an editor there. You’ll need to close the file on the host before you can save in the editor in the VM.
answered Oct 26, 2012 at 23:30
![]()
2
Check with lsof if the file is open by another application
lsof /media/sf_Ubuntu/BuildNotes.txt
Or use fuser:
fuser -km /media/sf_Ubuntu/BuildNotes.txt
![]()
Mat
50.6k10 gold badges154 silver badges139 bronze badges
answered Oct 26, 2012 at 12:20
What fixed it for me (still a bit annoying but works), and is applicable to gedit, is to:
edit — preferences — editor
Put a check on «Create backup copy»
When saving from now on, save the file once, ignore the error, save again.
works every time.
answered Nov 12, 2013 at 15:21
1
using linux terminal, try editing the file using vi file_name and save it.
p.s I could not find another solution for this issue. vi worked
answered Sep 22, 2017 at 2:46
Skip to content
На чтение 2 мин. Опубликовано 15.12.2019
Автор FleshFire задал вопрос в разделе Другие языки и технологии
Процесс дал сбой (Не удается найти указанный файл). Geany, компилятор g++ и получил лучший ответ
Ответ от
Сохраните файл с кодом туда, где MinGW увидит этот файл.
sega_bu
Знаток
(371)
Путь примерно такой: C:mingw. и там ищем каталог, в котором лежит демо-пример «hello-world.c»
Я новичок в кодировании и только что скачал python и Geany geany-1.34.1_setup.exe. на windows 10. Я сохранил пустой файл hello_world.py. и ввел печать («Hello Python World») в окно редактирования. Ошибка в том, что система не может найти указанный путь. Затем я вошел в команды сборки и изменил команду Compile на C: Python35 python -m py_compile»% f», а команду Execute на C: Python35 python»% f», но все еще получаю то же сообщение об ошибке. Я не уверен, что мне нужно сделать, чтобы это исправить.
захват кода и результат
конфигурации сборки geany — первая половина команд python
вторая половина команда python в конфигурациях сборки
Столкнулся с такой проблемой:
написал программу в Geany, нажимаю сборку, выдает такую ошибку: Процесс дал сбой (Не удается найти указанный файл). Компилятор g++ (MinGW Installer). Что делать, подскажите, пожалуйста.
На другом ПК программа работала, так что дело не в коде.