how to write files in case insensitive linux?
-
Dear sirs,
I have this scenario and can't figure out how to let it work:
I am working with a custom debian 64 bit case INsensitive os, and i experience problems writing files to hdd location that is not /home/user/.I installed Qt Creator 10.xx and Qt 5.15.2 through linux installer.
If i try to edit a file with Qt Creator, or if i use QFile to write something to hdd, both methods work only if the destination location is inside /home/user/. Outside of this path, i can t write anything.
The permissions for writing are ok, i am thinking that the case insensitive operating system could be a problem.
Is there a workaround for this? Can i do something to test if the problem comes out from case insensitivity os? Has anyone experience with similar problem?Kind Regards
emazed -
Ok, i tested QFile,
QOpen and QWrite are working fine, so i was wrong. The problem is only happening editing files within QtCreator.
I open a file, add some few characters, then i save, and i get a messagebox stating:
Cannot write /testfile.txt, no such file or directory.
Is somethig related to permissions for QtCreator? it is something simple?Kind Regards
emazed@emazed said in how to write files in case insensitive linux?:
Cannot write /testfile.txt, no such file or directory.
If that path is really
/testfile.txt
, which starts with a/
, and it's not somehow set up so that refers into your/home/user
area (e.g. by achroot
) then you should not have permission to write there. I don't know about "no such file or directory" message, but maybe you need to save back to a different path. -
Dear sirs,
I have this scenario and can't figure out how to let it work:
I am working with a custom debian 64 bit case INsensitive os, and i experience problems writing files to hdd location that is not /home/user/.I installed Qt Creator 10.xx and Qt 5.15.2 through linux installer.
If i try to edit a file with Qt Creator, or if i use QFile to write something to hdd, both methods work only if the destination location is inside /home/user/. Outside of this path, i can t write anything.
The permissions for writing are ok, i am thinking that the case insensitive operating system could be a problem.
Is there a workaround for this? Can i do something to test if the problem comes out from case insensitivity os? Has anyone experience with similar problem?Kind Regards
emazed -
Dear sirs,
I have this scenario and can't figure out how to let it work:
I am working with a custom debian 64 bit case INsensitive os, and i experience problems writing files to hdd location that is not /home/user/.I installed Qt Creator 10.xx and Qt 5.15.2 through linux installer.
If i try to edit a file with Qt Creator, or if i use QFile to write something to hdd, both methods work only if the destination location is inside /home/user/. Outside of this path, i can t write anything.
The permissions for writing are ok, i am thinking that the case insensitive operating system could be a problem.
Is there a workaround for this? Can i do something to test if the problem comes out from case insensitivity os? Has anyone experience with similar problem?Kind Regards
emazed@emazed said in how to write files in case insensitive linux?:
Outside of this path, i can t write anything.
Non root users can't write outside of their home folder, except in /tmp
Also, not the operating system is case insensitive, but the file system.But as @JonB already wrote: add at least basic error handling to your app to see what exactly the problem is...
-
@emazed said in how to write files in case insensitive linux?:
Outside of this path, i can t write anything.
Non root users can't write outside of their home folder, except in /tmp
Also, not the operating system is case insensitive, but the file system.But as @JonB already wrote: add at least basic error handling to your app to see what exactly the problem is...
Ok, i tested QFile,
QOpen and QWrite are working fine, so i was wrong. The problem is only happening editing files within QtCreator.
I open a file, add some few characters, then i save, and i get a messagebox stating:
Cannot write /testfile.txt, no such file or directory.
Is somethig related to permissions for QtCreator? it is something simple?Kind Regards
emazed -
Ok, i tested QFile,
QOpen and QWrite are working fine, so i was wrong. The problem is only happening editing files within QtCreator.
I open a file, add some few characters, then i save, and i get a messagebox stating:
Cannot write /testfile.txt, no such file or directory.
Is somethig related to permissions for QtCreator? it is something simple?Kind Regards
emazed@emazed said in how to write files in case insensitive linux?:
Cannot write /testfile.txt, no such file or directory.
If that path is really
/testfile.txt
, which starts with a/
, and it's not somehow set up so that refers into your/home/user
area (e.g. by achroot
) then you should not have permission to write there. I don't know about "no such file or directory" message, but maybe you need to save back to a different path. -
@emazed said in how to write files in case insensitive linux?:
Cannot write /testfile.txt, no such file or directory.
If that path is really
/testfile.txt
, which starts with a/
, and it's not somehow set up so that refers into your/home/user
area (e.g. by achroot
) then you should not have permission to write there. I don't know about "no such file or directory" message, but maybe you need to save back to a different path.the full message is "Cannot write file /C/Qt_Sources/testfile/filemorto.txt: No such file or directory".
Yes it is outside /home/user. I know, now this question is out of scope of Qt forum, and it s more a linux related problem, but is there a way to let it work, instead of copying all source file to /home/user?
Anyway many thanks, my ideas are a bit clearer now...King Regards
emazed -
-
the full message is "Cannot write file /C/Qt_Sources/testfile/filemorto.txt: No such file or directory".
Yes it is outside /home/user. I know, now this question is out of scope of Qt forum, and it s more a linux related problem, but is there a way to let it work, instead of copying all source file to /home/user?
Anyway many thanks, my ideas are a bit clearer now...King Regards
emazed@emazed said in how to write files in case insensitive linux?:
the full message is "Cannot write file /C/Qt_Sources/testfile/filemorto.txt: No such file or directory"
Then please don't write
Cannot write /testfile.txt, no such file or directory.
, it's a completely different path, if you want help you have to tell us what is actually happening not something different which you feel like typing in!I cannot imagine why you have a path starting
/C/...
when you say you are under Linux. You have never mentioned anything about Windows, which it looks like this is connected with....So if the error message states
"Cannot write file /C/Qt_Sources/testfile/filemorto.txt: No such file or directory".
can you confirm that (a) the directory
/C/Qt_Sources/testfile
exists and (b) what its permissions are.ls -ld /C/Qt_Sources/testfile
would probably do it. -
@emazed said in how to write files in case insensitive linux?:
the full message is "Cannot write file /C/Qt_Sources/testfile/filemorto.txt: No such file or directory"
Then please don't write
Cannot write /testfile.txt, no such file or directory.
, it's a completely different path, if you want help you have to tell us what is actually happening not something different which you feel like typing in!I cannot imagine why you have a path starting
/C/...
when you say you are under Linux. You have never mentioned anything about Windows, which it looks like this is connected with....So if the error message states
"Cannot write file /C/Qt_Sources/testfile/filemorto.txt: No such file or directory".
can you confirm that (a) the directory
/C/Qt_Sources/testfile
exists and (b) what its permissions are.ls -ld /C/Qt_Sources/testfile
would probably do it.ok here is what i have:
i am working with this custom os, that has been created for work. It s a company proprietary OS. Both the file system (case insensitive) and the /C/ folder, seems (i am not sure about it) an attempt to recreate a linux environment similar to Windows.
I see from / folder that /C/ folder is a link pointing to /home/z32/.C folder.
ls -l in / folder returns for /C lrwxrwxrwx 1 root root ... C -> /home/z32/.C
while
ls -l at /C/Qt_Sources/testfile yelds -rw-r--r-- 1 z32 z32 .... filemorto.txtthe file exist, seems to be out of scope of creator.... pretty strange
thanks
Kind Regards
emazed -
@emazed said in how to write files in case insensitive linux?:
the full message is "Cannot write file /C/Qt_Sources/testfile/filemorto.txt: No such file or directory"
Then please don't write
Cannot write /testfile.txt, no such file or directory.
, it's a completely different path, if you want help you have to tell us what is actually happening not something different which you feel like typing in!I cannot imagine why you have a path starting
/C/...
when you say you are under Linux. You have never mentioned anything about Windows, which it looks like this is connected with....So if the error message states
"Cannot write file /C/Qt_Sources/testfile/filemorto.txt: No such file or directory".
can you confirm that (a) the directory
/C/Qt_Sources/testfile
exists and (b) what its permissions are.ls -ld /C/Qt_Sources/testfile
would probably do it.@JonB
too complicated, i need support from the person who created this. I will ask help to him. Inside /home/z32 there are a lot of hidden folders, and one of these called ".Cdata" seems a copy of ".C" but with all lowercase names. Editing files within ".Cdata" works and also changes the content of ".C" folder.
QtCreator can handle correctly the content in ".Cdata", while can t see anything whithin ".C" folder. This is actually too messy and goes beyond my capabilities. I will ask to the author of this os.Thanks for hints
best regards
emazed -
ok here is what i have:
i am working with this custom os, that has been created for work. It s a company proprietary OS. Both the file system (case insensitive) and the /C/ folder, seems (i am not sure about it) an attempt to recreate a linux environment similar to Windows.
I see from / folder that /C/ folder is a link pointing to /home/z32/.C folder.
ls -l in / folder returns for /C lrwxrwxrwx 1 root root ... C -> /home/z32/.C
while
ls -l at /C/Qt_Sources/testfile yelds -rw-r--r-- 1 z32 z32 .... filemorto.txtthe file exist, seems to be out of scope of creator.... pretty strange
thanks
Kind Regards
emazed@emazed said in how to write files in case insensitive linux?:
ls -l at /C/Qt_Sources/testfile yelds -rw-r--r-- 1 z32 z32 .... filemorto.txt
I (deliberately) asked you to run
ls -ld /C/Qt_Sources/testfile
, but you have chosen to only usels -l
instead.... -
@emazed said in how to write files in case insensitive linux?:
ls -l at /C/Qt_Sources/testfile yelds -rw-r--r-- 1 z32 z32 .... filemorto.txt
I (deliberately) asked you to run
ls -ld /C/Qt_Sources/testfile
, but you have chosen to only usels -l
instead.... -
@JonB
sorry i wrongly thought it were a mistake.
from /, ls -ld gives:
drwxr-xr-x 2 z32 z32 4096 Jun 27 11:59 /C/Qt_Sources/testfile
this is the only line i get as outputkind regards
emazed@emazed
Fair enough. Assuming you are userz32
, both the directory and the file in it you happen to be trying to save do both show as writable by you.the full message is
"Cannot write file /C/Qt_Sources/testfile/filemorto.txt: No such file or directory".
The fact that this spits out
No such file or directory
on what I believe you have now shown is a writable file in a writable directory, rather than sayPermission denied
, hints to me that there is something "funny" going on. Then again, if you say it is only Qt Creator which does so, nothing else, is curious.