Re: "Access denied" with xp_cmdshell (!)



Does the command work fine if you execute it from a prompt started as the
service account?

Have you checked both the permissions for the share and for the file?

If the answer to both these questions is yes, then you might try to run file
monitor to see where the access denied is coming from. See
http://www.sysinternals.com/Utilities/Filemon.html.

Thanks

--
Laurentiu Cristofor [MSFT]
Software Design Engineer
SQL Server Engine
http://blogs.msdn.com/lcris/

This posting is provided "AS IS" with no warranties, and confers no rights.

"Vycka" <vyciunas@xxxxxx> wrote in message
news:uMKcLj0xGHA.4732@xxxxxxxxxxxxxxxxxxxxxxx
But problem is that I have tried to give for that account full control
seperately. I mean I added the permission entry "DOMAIN\SQLUser - Full
control" to NTFS security and also to sharing security settings.

Still waiting for help...

Vycka

"Laurentiu Cristofor [MSFT]" <laur@xxxxxxxxxx> wrote in message
news:%233fybxwxGHA.3492@xxxxxxxxxxxxxxxxxxxxxxx
If you recently made the domain account an administrator, you may need to
restart Sql Server for those permissions to take effect. A change of
permissions for an account won't affect processes already running as that
account.

Thanks

--
Laurentiu Cristofor [MSFT]
Software Design Engineer
SQL Server Engine
http://blogs.msdn.com/lcris/

This posting is provided "AS IS" with no warranties, and confers no
rights.

"Vycka" <vyciunas@xxxxxx> wrote in message
news:ejaW$gsxGHA.2168@xxxxxxxxxxxxxxxxxxxxxxx
Hello,

I'm running this command on my SQL server and I'm getting an error
'Access
denied.'

EXEC master.dbo.xp_cmdshell 'cacls "\\PC1\Temp\3.bmp" \E \G
DOMAIN\User:R'


- My sql server service is running on a domain account and that account
is
and administrator in sql server computer and in computer PC1.
- Directory "Temp" Sharing rights are "everyone - full control".
- File 3.bmp permissions are that all admins get full control.


This command works fine only when I set file permissions to "everyone -
full
control".


SQL server version - MS SQL 2005 Standard edition x64

Thanks for help

Vyckla









.



Relevant Pages

  • Re: Server Unavailable - ASP.NET 2.0 on Windows XP
    ... Please review the permissions outlined in this article. ... Make sure that the HOME-WKSTATION\ASPNET account has been assigned NTFS ... So I switched to that directory in Command Prompt and tried the ... If I switch the Windows XP ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Server Unavailable - ASP.NET 2.0 on Windows XP
    ... The -ga command isn't a part of that beta version. ... permissions to the global assembly cache. ... Please review the steps in it, for creating a service account for an ASP.NET 2.0 application, ... I've also tried the aspnet_regiis thing as well as setting permissions on folders as described ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Execute Persmission denied on object sp_OACreate
    ... If so what access and permissions. ... The account is a windows account. ... One method to test permissions is to log in to your SQL Server box using the ... >>> SA account password and gaining access to the database. ...
    (microsoft.public.sqlserver.security)
  • Re: Specifying a logon account for SQL Server 2005 services
    ... As I mentioned using a Windows domain account with no permissions is the ... configured only for very specific server and memory configurations. ... account to use while installing SQL Server, will SQL Server give this account ...
    (microsoft.public.sqlserver.security)
  • Execute Process Task not failing, but not executing the batch comm
    ... I can execute the following command from the windows "Run" prompt and it ... Might I have something set weird in SQL Server? ... server being by default configured to run as localsystem account, ...
    (microsoft.public.sqlserver.dts)