UWP on Windows 1903 broadFileSystemAccess access denied on Drive D - wpf

broadFileSystemAccess works as expected when accessing files on Drive C, however, as soon as I try to access files on another Drive, I get access denied
Without broadFileSystemAccess, load a file from the Desktop. Access Denied as expected.
With broadFileSystemAccess, load a file from the Desktop. Access Granted as expected.
With broadFileSystemAccess, load a file from the Drive D. Access Denied not expected.
Dim file = Await Windows.Storage.StorageFile.GetFileFromPathAsync("D:\TestFile.txt")
I should be able to access any drive. My system has 4 drives and a NAS, only Drive C is accessable using broadFileSystemAccess.
What do I need to do to allow my app to access files on other drives; this is the only thing holding me back from porting my WPF apps.
Thanks in advance

I'm going to close this. I updated to the latest patch today and it's fixed. The prompt to ask a user to allow the app file system permissions is still broken (e.g. it doesn't prompt still), but the access to files on other drives is now working.
Additional info: I also created new C# and vb.net apps to test the theory and they work as expected, I then went back to the failing project and it's now working - hence me assuming the patch fixed it.

Related

Problems writing to USB drive from _www process

I have a macOS C program which is a helper app. It runs as root and has sticky permissions.
One of the jobs of this program is to backup files to an external USB drive.
When I run the program from a terminal window... it works perfectly.
However, when invoked via a web admin page (eg., via the web server), it fails to run with an "operation not permitted".
This is on the latest macOS. I've set the drive to be "ignore ownership on this volume". The drive in /Volumes is also 777.
So... when the process is invoked via the web, the user/group is both _www. It appears that no matter what, the process invoked via _www can't write to the USB stick.
To be more specific... it can't create any new files. It CAN overwrite existing ones. It can't mkdir either.
I've googled my brains out and no solutions seem to work.
Any help would be appreciated!
Ok, I found the solution here.
Open System Preferences and go to Security/Privacy and then click Full Disk Access from the left side and enable the httpd access from the right side.
Thanks!

Same File operation not permitted. Access to path denied, Silverlight 5.0

I am working with a silverlight application, File.WriteAllText is giving File operation not permitted when trying to write to local desktop. Access to path exception.
This code always works on local desktop but, is giving error when code is deployed on server.
Silverlight does not have the access priveleges like u expect. If you want to add a file to your Silverlight Application at runtime, you will need to have Silverlight running Out of the Browser with Elevated priveleges. There are certain limitations to this too. You can only access files in Special Folders like My Documents, Pictures, Music etc. For more info, see this and this

Database errors in Quantum Grid demos in Delphi XE Professional

Whenever I open one of the Quantum Grid demos in Delphi XE Pro (on Windows 7 32-bit), the following error is displayed for every table (I think) in the project:
error message http://www.tranglos.com/img/qgerror.png
The message is:
Network initialization failed.
File or directory does not exist.
File: C:\PDOXUSRS.NET
Permission denied.
Directory: C:\.
I understand permission issues writing to c:\, but the result is that while I can build and run the demo projects, no data is displayed, which makes the demos rather useless. And what kind of database writes its configuration to c:\ directory in the 21st century anyway? :) (Yes, I know very little about Paradox databases, but I won't ever be using one either. I just want to learn how to use the grid.)
Using BDE Administrator I've tried changing the Paradox "NET DIR" value to a folder with write permissions on the C drive. Result: now the database tables cannot find their data:
Path not found.
File: C:..\..\Data\GENRES.DB.
...and the unhelpfully truncated path gives no indication where the files are expected to be.
Is there a way to work around the problem so that the demos can load their sample data correctly?
Did you install the BDE correctly? It should use the DBDEMOS files. Do you see such an alias in the BDE administration utility? Can you open that database in one of the Delphi demos?
The BDE is not a XXI century database, it was developed twenty years ago and never upgraded lately. It's an obsolete tecnology, but because it comes still with every release of Delphi with a known database it is still often used in demos because nothing new has to be installed.
Anyway that file is not its configuration file. It's a sharing lock file to allow more than one user to use the database concurrently. Because it is a file based database without a central server, it has to use such kind of shared files. Usually its position is changed to a network share, but it defaults to C:\ for historical reasons.
Anyway it's not only the BDE still attempting to write in the prong directories. I still see a full bunch of applications attempting to write to C:\ (especially logs) or other read-only positions.
Using BDE Admin to change the location for PDOXUSRS.NET helped, but it wasn't sufficient. DevExpress did the right thing in specifying a relative folder for the data location, and the relative folder seems perfectly allright, but for some reason the DB can't find it.
Solution: under the \Demos\ folder find all the *.dfm files that contain the string
..\..\Data
and replace that string with the absolute path to the demos folder. That done, all the demos open correctly.
I know this message from our own applications. It has to do with security measures introduced with Windows Vista. The operating system trying to protect critical files denies access to them. There is a method how to bypass this mechanism without compromising security. Try to run your application in compatibility mode. When application is running in compatibility mode, read / write operations from / to system folders are redirected to "safe" directories located in C:\Users[Current User]\AppData\Local\VirtualStore.
More info on http://www.windowsecurity.com/articles/Protecting-System-Files-UAC-Virtualization-Part1.html.

Live Mesh has screwed up my file permissions

I got the bright idea of using Live Mesh to sync up my development directories between my laptop and desktop machines. It appears that the permission on any new files that are added through Live Mesh do not inherit permissions from the parent directory. Now I cannot overwrite the permissions on those files. I keep getting an "Access is Denied" error when attempting to do so, even if I am running Windows Explorer as administrator. I have two questions:
How can I modify the file permissions to allow them to inherit again?
Has anyone used Live Mesh to do this sort of thing? Or should I be using FolderShare instead?
See the TakeOwn command to regain access to your files. You may also need to use the cacls command depending on the state of your files.
In my experience, Windows Live Mesh does not handle syncing files between multiple user accounts. Windows Live Folder Sync seems to handle this better.

write file in network shared folder with UnauthorizedAccessException?

hi the win mobile 6 code tries to write files on network shared folder, but always gets UnauthorizedAccessException. I have checked permission and security setting on the folder and the code can read the file but just cant write to it. The code runs under administrator account which has full control over the folder and files. It is in vs 2008 professional with device emulator.Any help please? thanks very much.
You've verified that you can write the file outside of your program, correct? i.e. logged into a machine account and tried placing that specific file there.
Do you have access to the system that hosts the file? If so, you can check it's access logs to verify which account your app is using.
My guess would be that either your app isn't using the account you think it is, or that the admin account may doesn't actually have write access to that folder or file.

Resources