I am trying to create a SQL Server Express database using SMO like so:
Database db = new Database(server, dataSource);
...
db.Create();
I am able to use the database fine. But, if someone else tries to copy the database, they get file permission errors. In looking under the security tab in windows explorer, I am the only one who has permission. If I simply make a copy of the file, the copy gives everyone permissions.
So, what do I have to do in order for the Create() to give everyone permission? I would think that the file created would inherit the directory's permissions...but apparently not. I realize I could set the file permissions myself but would rather try to understand why the Create() is giving special permissions.