6

I installed Noip and ran the command which created the config file

/usr/local/bin/noip2 -C

and then I ran the run command

/usr/local/bin/noip2

and it returned

Can't locate configuration file /usr/local/etc/no-ip2.conf. (Try -c). Ending!

I checked the location of the file and it was definitely there. Any idea why it could not locate the file?

Output of strace:

execve("/usr/local/bin/noip2", ["/usr/local/bin/noip2"], [/* 15 vars */]) = 0
brk(0)                                  = 0x1375000
uname({sys="Linux", node="raspberrypi", ...}) = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f33000
access("/etc/ld.so.preload", R_OK)      = 0
open("/etc/ld.so.preload", O_RDONLY)    = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=44, ...}) = 0
mmap2(NULL, 44, PROT_READ|PROT_WRITE, MAP_PRIVATE, 3, 0) = 0xb6f32000
close(3)                                = 0
open("/usr/lib/arm-linux-gnueabihf/libcofi_rpi.so", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\270\4\0\0004\0\0\0"..., 512) = 512
lseek(3, 7276, SEEK_SET)                = 7276
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1080) = 1080
lseek(3, 7001, SEEK_SET)                = 7001
read(3, "A.\0\0\0aeabi\0\1$\0\0\0\0056\0\6\6\10\1\t\1\n\2\22\4\24\1\25"..., 47) = 47
fstat64(3, {st_mode=S_IFREG|0755, st_size=10170, ...}) = 0
mmap2(NULL, 39740, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6f07000
mprotect(0xb6f09000, 28672, PROT_NONE)  = 0
mmap2(0xb6f10000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb6f10000
close(3)                                = 0
munmap(0xb6f32000, 44)                  = 0
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=44950, ...}) = 0
mmap2(NULL, 44950, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6efc000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/arm-linux-gnueabihf/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\214y\1\0004\0\0\0"..., 512) = 512
lseek(3, 1198880, SEEK_SET)             = 1198880
read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1360) = 1360
lseek(3, 1198444, SEEK_SET)             = 1198444
read(3, "A.\0\0\0aeabi\0\1$\0\0\0\0056\0\6\6\10\1\t\1\n\2\22\4\24\1\25"..., 47) = 47
fstat64(3, {st_mode=S_IFREG|0755, st_size=1200240, ...}) = 0
mmap2(NULL, 1242408, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb6dcc000
mprotect(0xb6eef000, 28672, PROT_NONE)  = 0
mmap2(0xb6ef6000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x122) = 0xb6ef6000
mmap2(0xb6ef9000, 9512, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb6ef9000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f32000
set_tls(0xb6f324c0, 0xb6f32b98, 0xb6f37048, 0xb6f324c0, 0xb6f37048) = 0
mprotect(0xb6ef6000, 8192, PROT_READ)   = 0
mprotect(0xb6f36000, 4096, PROT_READ)   = 0
munmap(0xb6efc000, 44950)               = 0
rt_sigaction(SIGHUP, {SIG_IGN, [], 0x4000000 /* SA_??? */}, NULL, 8) = 0
rt_sigaction(SIGPIPE, {SIG_IGN, [], 0x4000000 /* SA_??? */}, NULL, 8) = 0
rt_sigaction(SIGUSR1, {SIG_IGN, [], 0x4000000 /* SA_??? */}, NULL, 8) = 0
rt_sigaction(SIGUSR2, {SIG_IGN, [], 0x4000000 /* SA_??? */}, NULL, 8) = 0
rt_sigaction(SIGALRM, {0xa568, [], 0x4000000 /* SA_??? */}, NULL, 8) = 0
getcwd("/home/pi", 4096)                = 9
lstat64("/home/pi/noip2", 0xbef6f670)   = -1 ENOENT (No such file or directory)
open("/usr/local/etc/no-ip2.conf", O_RDWR) = -1 EACCES (Permission denied)
open("/usr/local/etc/no-ip2.conf", O_RDONLY) = -1 EACCES (Permission denied)
write(2, "Can't locate configuration file "..., 79Can't locate configuration file /usr/local/etc/no-ip2.conf. (Try -c). Ending!

) = 79
exit_group(-1)                          = ?

Thanks

Will B
  • 63

4 Answers4

2
open("/usr/local/etc/no-ip2.conf", O_RDWR) = -1 EACCES (Permission denied)
open("/usr/local/etc/no-ip2.conf", O_RDONLY) = -1 EACCES (Permission denied)

noip2 tries to open its configuration file for reading and writing, and when this fails it tries again just to read, which also fails. The failure is due to a lack of permission; the error message is unhelpfully generic.

Check the permissions of the configuration file and of the directories leading to it (well, / and /usr are surely ok, or your system would be broken in more visible ways).

ls -ld /usr/local /usr/local/etc /usr/local/etc/no-ip2.conf

The directories must have at least the x permission bit for the user running the command — probably for all users. The file itself must have at least the r permission bit. The directories should have the r permission bit (strictly speaking, it isn't required, but it's the normal thing; see Do the parent directory's permissions matter when accessing a subdirectory? for details).

You probably want chmod a+rX /usr/local/etc /usr/local/etc/no-ip2.conf, unless the configuration file is supposed to be confidential (e.g. because it contains a password).

If one of the entries has + after the r/w/x permission bits, then there is a security framework such as SELinux which may be imposing additional restrictions.

  • Thanks! The ls command came up with -rw------- so I ran the chmod which changed the permissions to -rw-r--r-- so I modified the command slightly to make it -rwxr-xr-x. Thanks for helping me to learn about chmod in the process! – Will B Oct 18 '14 at 01:32
0

I had this problem. I think it was a permissions issue. It worked for me to run it as root:

$ sudo noip2

You might have to kill running instances first.

$ ps -A |grep noip
 1577 ?        00:00:00 noip2
$ sudo kill 1577
ki9
  • 413
0

It is a permissions problem. I fixed with:

chown noip.wheel /usr/local/etc/no-ip2.conf
AdminBee
  • 22,803
0

Mine was RO file system, strace show , O_RDWR) = -1 EROFS (Read-only file system)

Copy to /dev/shm helps :D