View Issue Details

IDProjectCategoryView StatusLast Update
0037113FPCDocumentationpublic2020-05-19 14:32
ReporterHeiko Assigned ToMichael Van Canneyt  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformx86_64OSLinux 
Product Version3.0.4 
Fixed in Version3.3.1 
Summary0037113: Unable to open file created for reading using Reset() on Linux
DescriptionOn Linux, Reset does not allow opening files, even if reading permissions are set - it gives "Access denied" error.

Fixed with: filemode := 0;

The possible filemodes should be documented in the documentation.

Why is the behavior of text and file different?
Steps To Reproduce$ ls -lisan test
7346791 4 -r--r--r-- 1 1000 1000 2647 Dez 18 09:51 test

---

program my_test;

var f : file;

begin
     assign (f,'test');
     reset (f,1);
     close (f);
end.

---

$ ./my_test
Runtime error 5 at $00000000004010B5
Additional InformationWith reference to

http://free-pascal-general.1045716.n5.nabble.com/Type-of-file-mode-variable-td3892186.html

and

http://docwiki.embarcadero.com/Libraries/XE3/en/System.FileMode
TagsNo tags attached.
Fixed in Revision1703
FPCOldBugId
FPCTarget3.2.0
Attached Files

Activities

Michael Van Canneyt

2020-05-19 11:25

administrator   ~0122929

Filemode was already mentioned in the reset() documentation.
I updated this so it is now a link to the 'FileMode' constant, and I updated the constant documentation to mention the 3 possible values.

Should be visible when the 3.2.0 is released.

Heiko

2020-05-19 14:32

reporter   ~0122932

Thanks!

Issue History

Date Modified Username Field Change
2020-05-19 10:15 Heiko New Issue
2020-05-19 11:19 Michael Van Canneyt Assigned To => Michael Van Canneyt
2020-05-19 11:19 Michael Van Canneyt Status new => assigned
2020-05-19 11:19 Michael Van Canneyt Category RTL => Documentation
2020-05-19 11:19 Michael Van Canneyt FPCTarget => -
2020-05-19 11:25 Michael Van Canneyt Status assigned => resolved
2020-05-19 11:25 Michael Van Canneyt Resolution open => fixed
2020-05-19 11:25 Michael Van Canneyt Fixed in Version => 3.3.1
2020-05-19 11:25 Michael Van Canneyt Fixed in Revision => 1703
2020-05-19 11:25 Michael Van Canneyt FPCTarget - => 3.2.0
2020-05-19 11:25 Michael Van Canneyt Note Added: 0122929
2020-05-19 14:32 Heiko Note Added: 0122932