Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

xp_cmdshell

3 posts in General Discussion Last posting was on 2012-10-16 06:03:01.0Z
Raj Posted on 2012-10-03 09:44:16.0Z
Sender: 6044.506c0790.1804289383@sybase.com
From: Raj
Newsgroups: sybase.public.ase.general
Subject: xp_cmdshell
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <506c08f0.6134.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 3 Oct 2012 02:44:16 -0700
X-Trace: forums-1-dub 1349257456 172.20.134.41 (3 Oct 2012 02:44:16 -0700)
X-Original-Trace: 3 Oct 2012 02:44:16 -0700, 172.20.134.41
Lines: 12
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31410
Article PK: 74299

Hi,

We are running sybase ASE 15.0.3 on AIX 5.1, Have tried
to touch a file in a folder(permission 775) as 'sybase' it
worked. But when run the same touch command from
xp_cmdshell, it doesn't works. ASE running as 'sybase'.
Would it behave differently when we run via xp_cmdshell ?
Does it not run as 'sybase' ? Just to let you know, I login
to OS as different user and sudo to 'sybase'.

Thanks,
Raj


"Mark A. Parsons" <iron_horse Posted on 2012-10-03 12:40:42.0Z
From: "Mark A. Parsons" <iron_horse@no_spamola.compuserve.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: xp_cmdshell
References: <506c08f0.6134.1681692777@sybase.com>
In-Reply-To: <506c08f0.6134.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 120916-1, 09/16/2012), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <506c324a$1@forums-1-dub>
Date: 3 Oct 2012 05:40:42 -0700
X-Trace: forums-1-dub 1349268042 172.20.134.152 (3 Oct 2012 05:40:42 -0700)
X-Original-Trace: 3 Oct 2012 05:40:42 -0700, vip152.sybase.com
Lines: 23
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31411
Article PK: 74302

What do you mean by "it doesn't works"? Do you an error stating your Sybase login does not have the permissions to use
xp_cmdshell? Are you touching a file that already exists and you get an error stating that you do not have access to
the file? Do you get an error that says you can't create the file? Does the file get created but with a non-sybase owner?

What is the actual xp_cmdshell command you're submitting to Sybase?

Who are you logged in as in the dataserver?

What do you get when running 'sp_configure "xp_cmdshell context"' ?

On 10/03/2012 03:44, Raj wrote:
> Hi,
>
> We are running sybase ASE 15.0.3 on AIX 5.1, Have tried
> to touch a file in a folder(permission 775) as 'sybase' it
> worked. But when run the same touch command from
> xp_cmdshell, it doesn't works. ASE running as 'sybase'.
> Would it behave differently when we run via xp_cmdshell ?
> Does it not run as 'sybase' ? Just to let you know, I login
> to OS as different user and sudo to 'sybase'.
>
> Thanks,
> Raj


Raj Posted on 2012-10-16 06:03:01.0Z
Sender: 60d7.507cee30.1804289383@sybase.com
From: Raj
Newsgroups: sybase.public.ase.general
Subject: Re: xp_cmdshell
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <507cf895.6324.1681692777@sybase.com>
References: <506c324a$1@forums-1-dub>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 15 Oct 2012 23:03:01 -0700
X-Trace: forums-1-dub 1350367381 172.20.134.41 (15 Oct 2012 23:03:01 -0700)
X-Original-Trace: 15 Oct 2012 23:03:01 -0700, 172.20.134.41
Lines: 34
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31441
Article PK: 74329

Sorry for the late reply.
I was logging in as 'sybase' and "xp_cmdshell context" was
set to 0.
It was an permission issue. All good now.

> What do you mean by "it doesn't works"? Do you an error
> stating your Sybase login does not have the permissions to
> use xp_cmdshell? Are you touching a file that already
> exists and you get an error stating that you do not have
> access to the file? Do you get an error that says you
> can't create the file? Does the file get created but with
> a non-sybase owner?
>
> What is the actual xp_cmdshell command you're submitting
> to Sybase?
>
> Who are you logged in as in the dataserver?
>
> What do you get when running 'sp_configure "xp_cmdshell
> context"' ?
>
> On 10/03/2012 03:44, Raj wrote:
> > Hi,
> >
> > We are running sybase ASE 15.0.3 on AIX 5.1, Have
> > tried to touch a file in a folder(permission 775) as
> > 'sybase' it worked. But when run the same touch command
> > from xp_cmdshell, it doesn't works. ASE running as
> > 'sybase'. Would it behave differently when we run via
> > xp_cmdshell ? Does it not run as 'sybase' ? Just to let
> > you know, I login to OS as different user and sudo to
> 'sybase'. >
> > Thanks,
> > Raj