Forum > Linux

[SOLVED] Accessing Disks in Linux seems no longer possible with FileOpen

<< < (3/4) > >>

Gizmo:
It’s the same with string or unicodestring. (It’s widestring because in the full tool that var is used with windows functions too though I should probably switch it to unicodestring)

winni:
Hi!

Does /dev/sde exist?

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---....  SourceDevice := '/dev/sde'; if FileExists (SourceDevice) then showMessage ('OK') else  begin    showMessage (SourceDevice +' not found!'); exit;   end;....
And what is the rights situation of /dev/sde ??
It should be

--- Code: Bash  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---brw-rw---- 1 root disk 8, 32 Aug 28 11:58 sde
Winni

Gizmo:
Winni...ah, yes, schoolboy error by me. Tried with a different USB and the demo project DOES work! So that is good news. So, back to the drawing board of why my main program refuses to play ball even with a valid USB dev/sde.

winni:
Hi!

I know that situation:
3 sticks and one harddisk in the USB hub.
And no one knows what is connected to which device file ...
In those situations you got a friend:


--- Code: Bash  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---df -h
Winni

Gizmo:
Admins...you can delete this if you like. The problem was 100% unrelated to the post title. I hadn't noticed but it was yet another form that I'd not noticed was not being created when it needed to be, so the output that the program was trying to show was intended for a form that was not available, thus the "Access Denied" message. As soon as I spotted that (after placing ShowMessage all over the place so I could run the compiled binary as sudo outside of Lazarus because I couldn't run the program as sudo within Lazarus with the debugger and that was obviously what was cuasing -1 by FileOpen)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version