sqlar: makeDirectory called with permission bits of file

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

sqlar: makeDirectory called with permission bits of file

Winter, Martin

when extracting files in subdirectories from an sqlar archive, or when otherwise using the writefile function to create a file in a subdirectory, the makeDirectory function is called with the permission bits of the file. If e.g. the file has permission bits 0664, then the directory will have the same bits set, which results in a directory in which files cannot be accessed, as the execute bits are not set.

In this situation the permission bits of the directory are not explicitly given. However it would be much more appropriate to assume a 0755 permission for the directory, instead of using those of the file.

In the current code base the relevant code can be found at


line 481ff, where the "mode" variable is used both to create the file and to create the directory, if necessary.

sqlite-users mailing list
[hidden email]