Sponsored Content
Top Forums Programming Permission error while using execve.. Post 302913440 by sathish1000 on Saturday 16th of August 2014 11:50:07 PM
Old 08-17-2014
Hi,

I am trying launch a binary using execve command. The binary that I launch uses the jansson library to parse.

In such a case, I am getting a permission denied error to load the lib jansson.so.4. (I had pasted the lib jansson.so.4.4.0 and created a soft link to lib jansson.so.4).

The binary runs fine if run separately through command line both as root and normal user.

I tried to keep the jansson libraries in the home folder and try to load it with ld_library_path and ld_preload variables.

Ld preload fails to load and says it ignored it.
Ld library path checks the path given but doesn't pick it from there and keeps checking in other defaults library paths.

Can any one help me with this ..

Thanks,
Sathish
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

rm Permission Denied error

I am very new to Unix. We have a script that will remove files from a directory. The account removing the files has the same permissions as the directory the files are located. We have logged in as the account and deleted the files from that directory but when we run the script with the account... (7 Replies)
Discussion started by: Cech2002
7 Replies

2. UNIX for Advanced & Expert Users

getcwd: permission denied error

When I do a 'cd /appl' and issue 'ls -al' command, I get the following error for .. directory. ./..: Permission denied But still I get a listing of other directories under /appl. Also, if I give 'man' for any command under this /appl folder, I get the following error: ... (3 Replies)
Discussion started by: Deepa
3 Replies

3. Programming

execve to execute a program

I tried using the following code to execute a program but it doesnt seems to be working .. I would like to know whats wrong wit it . execve("/bin/cat", "words", NULL); (0 Replies)
Discussion started by: winsonlee
0 Replies

4. UNIX for Dummies Questions & Answers

script permission error

I am writing a VERY simple script that copies my catalina log file to a new filename then copies /dev/null inotthe catalina.out. Since the log is the live log, it is open and written to as I copy. I can do the 2 copy commands from a command promp with no problem, it works. I have the probmel in... (2 Replies)
Discussion started by: rschille
2 Replies

5. Programming

md5sum and execve

Hello there! Is there a way to use execve() to run md5sum function? for example execve("md5sum <filename>, NULL,NULL);" thanx! (2 Replies)
Discussion started by: nicos
2 Replies

6. Programming

pipe-fork-execve

Hi everyone , after a pipe() system call i've forked and entred into the child process to execve a shell script .the problem here is that when the execve sys call fail , i want to send the error code (eg errno) to the parent process using the pipe writer side p , there is nothing received in the... (4 Replies)
Discussion started by: xtremejames183
4 Replies

7. UNIX for Dummies Questions & Answers

Permission error

for FNAME in `find /unixsxxx/interface/2.0/xxxxxxx -type f \( -name '*.KSH' -o -name '*.sh' -o -name '*.sql' -o -name '*.ksh' \) -exec grep -il xxx.xxx.xxx.xxx {} \;`; do C=`grep -c xxx.xxx.xxx.xxx ${FNAME}`; echo "${C}:${FNAME}" >> /unixsxxx/apps/41.txt;done How to avoid my command from... (2 Replies)
Discussion started by: TimHortons
2 Replies

8. Programming

execve notification in user mode under Linux

Hi, I'm writing a monitor program that can be notified once a process makes an execve system call and then stop that process for examining before it starts to run the new code. I know I can ptrace a process to achieve this, but I do not want to ptrace every process in the system. Is it possible?... (1 Reply)
Discussion started by: aaron.lwe
1 Replies

9. UNIX for Dummies Questions & Answers

Conserving processes: execve() vs fork()

Disclaimer: This is just a rainy day experiment. There is no expected "goal" other than to understand UNIX better. After reading about fork and exec, my understanding is that forking, as the UNIX shell does by design, consequentially may sacrafice some speed versus an approach that runs in... (1 Reply)
Discussion started by: uiop44
1 Replies

10. UNIX for Dummies Questions & Answers

Webserver permission denied error

Hello, I was trying a perl-cgi tutorial and saving the data from online form to a file named (guests.txt). I am using the localhost port 80 for practice. My page file "guestbook.html" is working as I saw the online form. After filled out the blanks and submit, I was expecting to see the result... (3 Replies)
Discussion started by: yifangt
3 Replies
USELIB(2)						     Linux Programmer's Manual							 USELIB(2)

NAME
uselib - load shared library SYNOPSIS
#include <unistd.h> int uselib(const char *library); DESCRIPTION
The system call uselib() serves to load a shared library to be used by the calling process. It is given a pathname. The address where to load is found in the library itself. The library can have any recognized binary format. RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is set appropriately. ERRORS
In addition to all of the error codes returned by open(2) and mmap(2), the following may also be returned: EACCES The library specified by library does not have read or execute permission, or the caller does not have search permission for one of the directories in the path prefix. (See also path_resolution(7).) ENFILE The system limit on the total number of open files has been reached. ENOEXEC The file specified by library is not an executable of known type, e.g., does not have the correct magic numbers. CONFORMING TO
uselib() is Linux-specific, and should not be used in programs intended to be portable. NOTES
uselib() was used by early libc startup code to load the shared libraries with names found in an array of names in the binary. Since libc 4.3.2, startup code tries to prefix these names with "/usr/lib", "/lib" and "" before giving up. In libc 4.3.4 and later these names are looked for in the directories found in LD_LIBRARY_PATH, and if not found there, prefixes "/usr/lib", "/lib" and "/" are tried. From libc 4.4.4 on only the library "/lib/ld.so" is loaded, so that this dynamic library can load the remaining libraries needed (again using this call). This is also the state of affairs in libc5. glibc2 does not use this call. SEE ALSO
ar(1), gcc(1), ld(1), ldd(1), mmap(2), open(2), dlopen(3), capabilities(7), ld.so(8) COLOPHON
This page is part of release 3.25 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2005-01-09 USELIB(2)
All times are GMT -4. The time now is 01:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy