vsftpd and Debian.
Type: Posts; User: IsmAvatar2
vsftpd and Debian.
brewbuck: I'm not sure what you mean.
I have an FTP server which is set to *receive* files. Various people will ftp in and upload a file to the server. It is then the server's responsibility to...
brewbuck: The program that is depositing the files is ftp. If you want to say FTP is broken, be my guest.
Zlatko: Wouldn't it be more efficient to just get the d_ino from the dirent, rather than...
Zlatko: I cannot edit the source of the process modifying these files. /proc/pid/fd sounds like a good idea, but how do I know which ones refer to the file that I'm interested in?
itCbitC: In...
itCbitC:
int main() {
char *fn = "/tmp/test.txt"; //the test file
FILE *F = fopen(fn,"w"); //this simulates another process writing to a file but not closing it yet
//We now attempt to...
My concern is that my program may not have access to lsof or fuser, as they oftentimes require root privileges. I was also hoping that I might just be able to use their lower level routines without...
Yes. My program is to scan the directory for *new*, *completed* files created by another process.
Program 1 (not in my control) opens file "out1.txt" for writing.
P1 writes some bytes to file....
My program is to scan a directory for new files, and then forward them along. However, I cannot forward a file until it is complete, and as far as I'm aware, the only way to tell if the file is...
Let's suppose that I have a basic network with 3 computers connected to each other via Ethernet. Two of those computers wish to host my server program. The third computer wishes to run my client...
I'm a low level C programmer, and through an odd turn of events, I've come to start writing a GUI in Linux via Xlib (seeing as that seems to be the low level solution).
That said, I'll jump right...
I've upgraded to Fedora 9 and reinstalled pcap-devel from yum, and this has fixed the problem.
I'm writing a C program using pcap in which it sniffs for ipv6 packets, specifically ones of type icmp6. I know the filter for this is "ip6 proto icmp6", however during runtime it crashes with "ip6...
If you want spaces between the numbers, simply put a space after the %d on lines 8 and 11 of my code, and double the number of spaces printed prior to the row (line 5):
int x,y;
int rows =...
I can't even get it to compile, it gives me:
error at line 23 (end:) label at end of compound statement
warning at line 3 (void main(void)) return type of 'main' is not 'int'
Last time i...
int x,y;
int rows = 10;
for (y = 1; y <= rows; ++y) {
for (x = y; x < rows; ++x) {
printf(" ");
}
for (x = 0; x < y; ++x) {
printf("%d",(y+x) % 10);
}
for (x = y - 1; x >...
A common approach to linked lists is to keep the data separate from the linked list, and to keep the linked list open ended in terms of what data it can take in. To do this, we usually use a void...
In a Dictionary of unknown size N, with unknown length M (worst case), provided it is sorted, you can do a lookup in M*log2(N) worst-case and usual case. In a poorly defined hash, the number of...
Ah, I thought I might get trouble from having a string pointer with no address, but the compiler didn't give me any warnings or anything. Guess that explains it. I pointed it to fn, since the...
I have a text file that looks like this:
hello world
hello.worldfull
this.12345678.87654321
fullness!
And my program will basically just open the file, open an output file (name determined...
look at the fscanf function in stdio.h. It works similar to printf, only it reads input from a file rather than printing output to a buffer. The first argument is the file, the second argument is the...
When reading the input from the file, use fscanf, like this:
FILE *f;
patch p;
....
fscanf(f,"%d %d",p->height,p->width);
I'd consider using a different loop method. First off, there's no guarantee that the 11th character of the s array will be a null terminator, since you only allocated 10 characters, so it's undefined...
Note that strcmp() does not perform bounds checking, and thus risks overrunning str1 or str2. For a similar (and safer) function that includes bounds checking, see strncmp().
#include <string.h>...
I think the library you need is dirent.h
this will give you functions like opendir() and readdir()
You might also need sys/stat.h for stat()
It seems to me that your database will end up looking like this:
[ Last, First, User, Email, Major, Class, Next ]
0 = [ Allen, 0, 0, 0, 0, 0, null ]
1 = [ 0, Donaldson, 0, 0, 0, 0, 0 ]
2 = [ 0,...