• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 622
  • Last Modified:

what is the best permission should I assign for sql server folder?

Can anyone advise me here what is the best permission should I assign in sql server folder, what is the best recommended by Microsoft ?
0
motioneye
Asked:
motioneye
  • 4
  • 2
4 Solutions
 
RiteshShahCommented:
do you want to create some file from SQL Server and that is why asking for permission? or your goal is something else, please bit elaborate your question. as long as SQL Server's folder under Program file, you don't need to give any additional permission, and if you want to access some folder by SQL Server job than you have to give proper permission to that folder so that the user of your job can access that folder.
0
 
SNilssonCommented:
If it's an account that need to access the file area you might need the diskadmin role.

The diskadmin fixed server role allows its members to manage files on a disk. Members with this role can create, open, save, modify, or delete a file.
0
 
RiteshShahCommented:
you can add diskadmin role to your user with following script.


--for windows authenticated user

EXEC sp_addsrvrolemember 'MARS\Ritesh', 'diskadmin';
GO

--for SQL Server user

EXEC sp_addsrvrolemember 'Ritesh', 'diskadmin';
GO

0
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
motioneyeAuthor Commented:
sql server folder is not in program files, I must ensure that this server has stringent access as the information is really really sensitive.
0
 
RiteshShahCommented:
well in that case, you can create one folder or use existing folder, create one user in windows, assign it to DISKADMIN server role and also permit user to access that folder. remove all other rights for all other users from that folder.
0
 
motioneyeAuthor Commented:
Ok,
I presume that u explained me on service account which I use to start the services.
and this user account already has sysadmins in sql server, do we need still for diskadmin roles?
0
 
RiteshShahCommented:
it is better to have "DiskAdmin" if you are trying to access disk outside the SQL Server, here is what MS says for both roles:

diskadmin: The diskadmin fixed server role is used for managing disk files.

sysadmin: Members of the sysadmin fixed server role can perform any activity in the server. By default, all members of the Windows BUILTIN\Administrators group, the local administrator's group, are members of the sysadmin fixed server role.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now