script Permissions at OS level folder

  • Hi Team,

    Is there any T-SQL script which can i have DENY permission at OS level.

    The reason behind this is, am a sysadmin at SQL level. eventhen i was not able import data from flatfile to sql table.

    Later came to know that i had DENY permission at Windows level. E:\Flatfiles.

    Like we have syspermissions in sql and we can check for 'D' if have any DENY permission, do we have any script which would report us that i have these all permissions at windows level on a given folder "E:\Flatfiles" ???

    Any help would be greatly appreciated.

    Thanks in Advance.

  • SQL Server permissions and NTFS ACL are two different things. Why would you try to use SQL Server to change permissions on an NTFS file system?

  • I think the OP merely wants a script which lists permissions, rather than sets them, though it's not the clearest post of the day 🙂

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • @OP: IF the account running SQL Server has appropriate permissions you could probably use cacls.exe through xp_cmdshell to get what you want. Just google "cacls.exe" to get instructions on how to use it.

  • Yes, Am looking for something like cacls.exe. I dont want to change the permissions. i want to see whether he has read-wrte or deny permission on a particular folder.

    Thank you.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply