Programs Cannot Make Directories or Files
I'm using Raspbian on a Raspberry Pi which is based on Debian and have encountered a strange problem.
I compiled a program called aria2 from source and installed it with make install. On the config file Code:
/etc/aria2.conf Code:
/home/pi/.aria2/session.dat Code:
/etc/init.d/aria2.sh start If I first make the directory and create an empty file called session.dat, it starts perfectly. This is not the only program I have noticed has this behaviour. When you create a mount point in fstab file, it fails to mount unless the directory mentioned already exists. I am running everything as root so permission cannot be a problem. Please help me understand if this is normal Linux behaviour or I am missing something. Thanks in advance. |
editted out I negleted to read some crucial info..
|
Quote:
What is in your aria2.sh init file? Have you inspected it for possible reasons? |
Did you have some reason for compiling aria2 yourself, and not getting the ready made package?
https://packages.debian.org/wheezy/aria2 |
Quote:
Code:
#!/bin/sh |
Quote:
|
Quote:
Also, the program may simply not create the directory. It could be a bug, or a deliberate measure. To understand the situation better, there are number of options: Check if aria2c creates a log file with error messages. Or if it can be run with a verbose or debug flag to provide more information. Check under which user ID it runs. Using the source code or a system call trace (strace command), find whether it issues a mkdir system call, and if yes, how it fails. And then if all else fails you might even consider reading the documentation :D |
berndbausch, thank you for this information.
I read the manual for aria2 and found I made a mistake on the configuration file. The reason this directory and file was not being created was because it was an actual input file for aria2 to load urls from. Thanks to everyone who helped. |
All times are GMT -5. The time now is 08:17 PM. |