exec master..xp_cmdshell #CMD for sybase ase access denied - sybase-ase

I'm using the below code to call an executable file whenever a new row is inserted into the table.
exec master..xp_cmdshell #CMD
The executable file is not getting called. How should i give access for the default sa user the rights to execute the file

The command will be run as the user that your database is running as, not necessarily the user you are connecting to the database with. In many cases the username is sybase, so make sure that the OS user has permissions on the file system to the command.

Please ensure that sp_configure "xp_cmdshell context", 0
Default is 1 , this restrict the client execution privileges of the OS command specified with xp_cmdshell. Consult documentation for further details.


Trying to run bash command in windows /usr/bin/env: ‘php’: Permission denied

This is my command that I've made but I get an error , I'm on WIN10
The error says that the user account that tries to run the command on that system has not the permissions / rights to do so. Please check, what user is trying to run that command and either give appropriate rights or create / change the permissions on that file.

ODBC_connect runs only with psql user

I have a php script who ask data from a odbc database (pervasive client).
When i run the script in CLI as the psql user (which the installer created) , then i have no problems and the script runs.
When i run the script in browser ( as www-data) or in CLI as root or as a cronjob then i receive the error :
PHP Warning: odbc_connect(): SQL error: [unixODBC][Driver Manager]Can't open lib '/usr/local/psql/lib64/libodbcci.so' : file not found, SQL state 01000 in SQLConnect in /var/ww....
i have added the user www-data & root in the groups that the pervasive client has installed.
Everything runs on a Debian server.
Solution, as revealed in comments --
Set the environment variables for each user and process that needs to perform the task, to match the environment that was active for PHP and the psql user.
This was achieved by using a shellscript for the full task.

Unable to execute mysqldump from PHP script

I am trying to create periodic backups (poor man's cron) of my database using mysqldump with exec() function. I am using XAMPP/PHP7 on macOS.
$command = "$mysqldump_location -u$db_user -h$db_host -p$db_password $db_name > $backup_file_location";
When I run the PHP script, I get no SQL dump in the path mentioned in $backup_file_location but if I execute the same $command string on the terminal directly I get the desired SQL file in the desired location.
I am unable to understand what could be the problem here. Also open to suggestions on better ways to dump the entire DB.
Edit 1:
The value of $mysqldump_location is /Applications/XAMPP/xamppfiles/bin/mysqldump
The value of $backup_file_location is /Applications/XAMPP/xamppfiles/htdocs/app5/data/sqldumps/sql_data.sql
/app5/ is the folder in while I am developing my app.
Edit 2:
Possible duplicate suggestion does not apply since the issue here was not on how to dump SQL backups. The key issue here was that the backup using mysqldump was working through terminal, but not through PHP's exec() function.
The resolution of the issue, from above comments, was that the PHP request executes in XAMPP as a user that has limited privileges, and the mysqldump process inherits those privileges.
Checking the exit status of the process run by exec() confirmed that mysqldump exited with a nonzero exit status, indicating it failed for some reason.
Opening write privileges to 777 on the directory where the mysqldump process tries to write resolved the error.
It should also be adequate to figure out the specific uid & gid of Apache processes (check the User and Group config values in the Apache config file (e.g. xampp-home/apache/conf/httpd.conf) and make the output directory writeable by that uid or gid.

access denied for user 'root'#'localhost - first time installed [closed]

i just installed the mysql and now i want to access it. i have check the mysql has been running. when execute mysql.exe in cmd it's always show an error :
ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using
password: NO)
i try to googling, and they commonly say it has problem with the password (?)
but i haven't do anything other than using instalation tutorial :(
i also try to run
mysqld --skip-grant-table
what is that command for ?
It is possible that you set password to user root.
In this case you need to reset password for root.
Create a text file containing the password-assignment statement on a single line. Replace the password with your .
MySQL 5.7.6 and later:
ALTER USER 'root'#'localhost' IDENTIFIED BY 'MyNewPass';
MySQL 5.7.5 and earlier:
SET PASSWORD FOR 'root'#'localhost' = PASSWORD('MyNewPass');
Save the file ge: to C:\mysql-init.txt .
Start the MySQL server with the special --init-file option (notice that the backslash in the option value is doubled):
C:> cd "C:\Program Files\MySQL\MySQL Server 5.7\bin"
C:> mysqld --init-file=C:\mysql-init.txt
If you installed MySQL to a different location, adjust the cd command accordingly.
The server executes the contents of the file named by the --init-file option at startup, changing the 'root'#'localhost' account password.
To have server output to appear in the console window rather than in a log file, add the --console option to the mysqld command.
If you installed MySQL using the MySQL Installation Wizard , you may need to specify a --defaults-file option.
For example:
C:> mysqld --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.7\my.ini" --init-file=C:\mysql-init.txt
The appropriate --defaults-file setting can be found using the Services Manager: From the Start menu, select Control Panel, then Administrative Tools, then Services. Find the MySQL service in the list, right-click it, and choose the Properties option. The Path to executable field contains the --defaults-file setting.
After the server has started successfully, delete C:\mysql-init.txt.
I have some problem few years ago and do like here http://dev.mysql.com/doc/refman/5.7/en/resetting-permissions.html
Run config script from mysql dir
shell> ./configure
the command you need is this:
mysql -u user -p<password here>

Execute VBScript from ssh (cygwin). Permission denied: 'CreateObject'

I'm using a VBScript to convert remotely a file from docx to pdf but I have problems with Window's permissions. I think the ssh user on cygwin sshd server has not administrator permission.
This is the error that the system show me.
Microsoft VBScript runtime error: Permission denied: 'CreateObject'
If I try to execute the script locally then everything works fine.
How can I config the ssh user on cygwin to execute the script as administrator?
I looked on google but I did not find anything.
Thank you
Would need more information on your environment, but here are some things that will help you resolve your issue.
Check what user is running the cygwin service. You can make it administrator or give the user more permissions(I recommend the later)
Use Process monitor to see what user is trying to execute the statement and give that user permissions.
Give the COM Object you are trying to call, Read+Execute permissions for Everyone or just the user running the script.