i want to make a program to write the result of access to a file ,i mean for example a user wants to (open,delete,edit)a file but if he has no access to this file ,something write to a log file.so after that i can check which user got access denied by accessing to which file.or if any tools available that can do this?or if there is any built in log access file that record the permission denied to files?
it is possible to change the root directory for a single, particular program. For example, I have an executable, 'miscreant.bin' that has all of it's required libraries in a directory named "libraries", in the same directory as the said executable. I can launch the program and make it use the libraries included with the executable rather than the system with:
With either, miscreant can be portable. But, I would also like to change the root directory (like chroot) of miscreant, so that the directory "~/miscreant/sandbox" becomes the root ("/"). So, if miscreant created a file named "/home/bryan/miscreant", it will be redirected to "~/miscreant/sandbox/home/bryan/miscreant". I am running Crunchbang 10 (Statler) on a 32-bit Atom netbook.
Looking for some help writing a simple script on my dapper server. I want the script to play a short 5 second wmv sound file. So I can tell another program to run the script. What player can or should I use and how can I set permissions on the file and script so my program has access to it . Total newb here
I am trying to check what all processes are accessing a particular file (a UDP socket in my case) on a filesystem.I am using 'fuser' for that.But, it seems, it only gives the processes accessing the file at that particular moment.Is there any way to continuously run 'fuser' (or some other command) which will give all processes accessing the file during its run?OR is it possible to generate a filesystem alert when a particular process accesses the file?
An error occured during running a code. I've made run configurations properly and I've chosen GNU Elf parser,Elf parser, Mach-O parser and Cygwin PE parser as a binary parser. Eclipse CDT can not find any error in the code and code runs in terminal properly. Here are the code:
Code: /* * pmutex.c * * Created on: Mar 7, 2010 */ #include <stdio.h>
[Code]...
Eclipse denies to run it.I've made an investigation over the eclipse.org, but I can not find any solution.
I have the following problem. I call a C++ program from a Java servlet by using Runtime exec. The OS is ubuntu and I use Netbeans 7.0 with Glassfish 3.1 web server.The program executes but it does not open and write into a specified file in a specified folder. The same C++ program compiled under Windows opens and writes this file.How can I solve this problem in Linux?
how to detect if a file is being opened by any application so that i can block it just before opening it... Actually i am working on android and using iNotify in JNI to detect the OPENING of a file...but the file is getting opened before the iNotify detects it..and therefore its displaying the contents of the file unmodified .. The actual requirement is that if anyone is trying to open the file it should be modified by my program and then the modified file should be opened.
I am learning Linux daemon programming and write a simple daemon program. The issue is no data is written to the log file (/var/tmp/simpledeamon.log) though the file is successfully created (it's file size is zero from ls -l output). Could someone kindly point out the error in my program,The code is based on the Devin Watson's article at Here is the code:
// simplydaemon.cpp // A simple Linux daemon. #include <sys/types.h>
i create a file with .py extension and run it then on windows it opens up directly in command prompt, but wat to do if i wish to do the same in ubuntu, i.e. i want the .py file to run in terminal as a console program, which does not happen as such.
I recently faced a problem. At my college, I linked my laptop with my friend's laptop with an ad-hoc wifi network. I wanted to send him a file. I was running Ubuntu, and he was running XP. Unfortunately, I could not find an easy way to send him the file. Another problem I faced was when I wanted to transfer the contents of my hard disk to another computer. I had to install Filezilla server on the other computer, and upload the files from one computer to the other.
I feel that its a really cumbersome method of transferring files in the same network. Mobile phones have bluetooth, and a file can be sent to another mobile very easily without any fuss. Does anyone know whether any such program exists already? If not, I want to write such a program that will allow one user to add another user to a personal network, and send or recieve files and/or communicate in other ways. The only language I know is Python (self-taught). I was wondering what GUI framework to use. I've never written a GUI program before, and would like to hear your opinions. This will be a very basic program, and must be able to run on many platforms.
i am trying to write a program which will read input from a text file, check if each line contains any alphabets and then display a message imforming me if there is an alphabet in each line. My text file is formatted in this way...
I opened a text file and read some stuff. Then I (think) I closed it. Then I tried to open another one and it stopped working. It seemed to compile fine though. Why would this be?
I am trying to write a bash script that installs a program fully automated for me. I am stuck at the one part where i need to change a line in one config file. I have tried various syntax for sed and none have worked. Maybe someone can suggest how to go about this. Since the line appears in the middle of the file, I can't use echo or cat. Also the file will be diffrent lengths depending on the install.
The line I need changed is:
I need that changed to:
the last syntax i tried is:
Yes this is for PNP4Nagios on centos 5.6 64bit. If i can get this figured out. I will be willing to post the whole thing for others to use. it will be used to install PNP after a working nagios install is done.
I need to disable file access (fopen, freopen, open etc) for application which is running under chroot jail and with restrictions (rlimit) via execv. Before that I redirected stdin/out to files within jail. I tried this:
Code: // Redirect stdin/stdout to files int fd = open (file_input, O_RDONLY); if (fd < 0) fatal_error ("input open failed!");
ccess to an iso file in chroot environment from my usual root (/) env..
Within the chroot environment I have an iso file placed... In my program I need to access this iso file and perform mount and other operations.. But I cant do this in the chroot environment as I have only basic commands here (ls,cp etc.. and no mount)
So how can I access this iso file from my program ? Is there something like a file-descriptor which I can associate with the file exit from the chroot env and access the file via this fd ?
I am running shell command through C program using system() routine.
I am executing "opcontrol --status" an executable using the this routine and I get the following error. access: unix error (2) No such file or directory
But when I give the complete path to the executable it runs perfectly.
The executable is installed in "/usr/local/bin/" And the path variable has this path.
I will have to code this. However I am lacking of time since I have too much to do. make a short code bash/dash to prompt the country with Zenity, then, get the PLS or m3u url and prompt with another zenity which radio to play. http://www.listenlive.eu/index.html
I want to generate core dump files from my program when it crashes. Its a pretty big process and has about 10-11 threads in it.I have followed the documentation to enable core dump by setting ulimit to unlimited etc. I quickly tried "A demo program creating a core dump" from the following webpage, which succeeds in Segfault and dumping a core file in the directory that I configured.However, I tried running my original program and caused it to crash. I did this by making calls to kill(), raise() or the same null pointer access as shown in the webpage above. In each case, my program crashed but did not generate a core dump file. Am I missing something?My program is in C++ and my environment is Redhat 9.0 (kernel 2.4.20)
Going through the "Why do I NOT get a core dump?" section on the same webpage as above, I can see two potential problems. One - there are issues with the suid/sgid (bullet # 6). I am not able to change any settings with suid because my system does not contain either /proc/sys/fs/suid_dumpable or /proc/sys/kernel/suid_dumpableTwo, my program has threads in it and the bullet # 8 is the problem.
im trying to build a simple program for my C programming class, this is the source code
#include <stdio.h> int main() { int length, width, length, height, area, perimeter; perimeter = width + length + height; area = width * length + heigth;
[Code]...
i dont see any error (you might)but every time i run it it runs but after it asks me to input for the width i do it but it doesn't take me to the length, it just stays blank until i input another value in the same place for the width, it asks me for 4 inputs in total i don;t know why, and after i run it different times it gives me different values for the perimeter and are. how can I fix this?
I just followed the instructions on the winehq site to compile and install the wine 1.3 source but i cant get access to the program some help would be great.
i am developping a tool for freeing up unused ram in linux ubuntu. i am finding something through which i would be able to access the ram of my pc using my c program. is there any system call available? or i have to do programming at kernel level? (i mean do i have to compile the whole kernel?)
I want to access a file, and check the length of every line.After, i want to check and replace all lines with length over 10 characters, with a message.Does anyone have a clue on that?
Is there any program/script that can create a torrent file for each file in a directory? I have been looking all over but can't seem to find anything of the sort. I have 700+ files I REALLY don't want to make my self.
I have downloaded all the filesand tried to do a "cmake" but it didnt work and i cant access the program.I do have zynaddsubfx but they sound different. Are they?
I am running Ubuntu 9.10 and had hoped to use Synaptic to find and install Truecrypt. As Synaptic couldn't find it I downloaded it from [URL]. In case it helps the file is called "truecrypt-6.3a-linux-x86.tar.gz". Apart from not knowing how to get a working program from the .tar.gz file, I don't know whether the installation process sorts out where the file should go and puts it there, or whether I have to create a directory for it and put it there myself.