Where to put shared user data on Windows 7?

6

1

My Windows XP application is used by multiple users, all with administrative access. The users collaborate on a set of shared data files via my application. We currently make the default location for that data a sub-directory of the application folder under program files. Please don't flame me, it wasn't my decision.

Anyway, it's time to look at Windows 7, and I don't see an obvious fit for where to make the default data location. I would want a solution where all the users could have full control of all the files while not being administrators.

Obviously, anything under the current user's home folder (\users\ on 7, I believe) is inappropriate given that the data "belongs" to multiple users. The default security settings on the "All Users\Shared Documents" folder, at least on XP, is wrong too. It is set up so that any user can add new files/directories to it, or modify files/dirs created by other users, but only the creator/owner can delete them. It is entirely appropriate for one user of this application to create a file and a different user to move or delete it. Anything under Program files is philosophically inappropriate and also practically inappropriate because of folder virtualization.

So, should I have my installer create a sub-folder under "Shared Documents" (using the proper shell API's so that it is portable, of course) that has special security access rules to allow anyone to do anything? Or is it more appropriate to home that outside of the standard Windows user data folders, say "c:\data" and then give everyone full permissions? Is there another, better way that I am missing?

edit

My understanding is that All Users\Shared Documents is a location with special quota rules designed around the very specific DACL on that folder. I want to conform to Windows standards, and if it is inappropriate to create a subfolder in that location that allows any user to do anything, then I'd like to know what the alternative is.

David Gladfelter

Posted 2010-02-26T20:28:17.120

Reputation:

Belongs to superuser.com! This is StackOverflow programming forum... – t0mm13b – 2010-02-26T20:57:38.140

3No, this belongs here; this is about "how do I write my application to put this data that is to be shared in the proper location" – Broam – 2010-02-26T21:02:49.750

C:\Users\Public\Documents perhaps? – None – 2010-02-26T21:32:59.180

Is Public a well-known name? My main concern is having a software installer put a custom DACL in an installer-created sub-folder of All Users/shared documents. If no one can think of a reason why that'd be a problem, that's a reasonable solution from my perspective. – None – 2010-02-28T02:20:19.453

3Unless this is an in-house program that you observe every computer it's installed on (which it sounds like it might be), please don't hard-code paths like "C:\Users\Public". There are environment variables and APIs that get you the correct name of the folder for that particular system. – Stephen Jennings – 2010-03-03T12:33:26.613

Answers

2

What's wrong with C:\ProgramData?

(The system makes that folder, and it's hidden by default)

jay

Posted 2010-02-26T20:28:17.120

Reputation: 6 287