<div dir="ltr">Thank you Antoine. I'm a developer rather than a systems administrator, I didn't know strace existed. I have tried it but I don't know what to make from the output:<br><br>$ strace run_erl priv/ log "erl"<br>execve("/usr/local/bin/run_erl", ["run_erl", "priv/", "log", "erl"], [/* 23 vars */]) = 0<br>brk(0) = 0x60c000<br>mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f794a62f000<br>access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)<br>open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3<br>fstat(3, {st_mode=S_IFREG|0644, st_size=32636, ...}) = 0<br>mmap(NULL, 32636, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f794a627000<br>close(3) = 0<br>open("/lib64/libutil.so.1", O_RDONLY|O_CLOEXEC) = 3<br>read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\17\0\0\0\0\0\0"..., 832) = 832<br>fstat(3, {st_mode=S_IFREG|0755, st_size=14608, ...}) = 0<br>mmap(NULL, 2105616, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f794a20d000<br>mprotect(0x7f794a20f000, 2093056, PROT_NONE) = 0<br>mmap(0x7f794a40e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f794a40e000<br>close(3) = 0<br>open("/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3<br>read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\16\0\0\0\0\0\0"..., 832) = 832<br>fstat(3, {st_mode=S_IFREG|0755, st_size=19512, ...}) = 0<br>mmap(NULL, 2109744, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f794a009000<br>mprotect(0x7f794a00c000, 2093056, PROT_NONE) = 0<br>mmap(0x7f794a20b000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f794a20b000<br>close(3) = 0<br>open("/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3<br>read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260T\0\0\0\0\0\0"..., 832) = 832<br>fstat(3, {st_mode=S_IFREG|0755, st_size=1141552, ...}) = 0<br>mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f794a626000<br>mmap(NULL, 3150168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7949d07000<br>mprotect(0x7f7949e08000, 2093056, PROT_NONE) = 0<br>mmap(0x7f794a007000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x100000) = 0x7f794a007000<br>close(3) = 0<br>open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3<br>read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\34\2\0\0\0\0\0"..., 832) = 832<br>fstat(3, {st_mode=S_IFREG|0755, st_size=2107600, ...}) = 0<br>mmap(NULL, 3932736, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7949946000<br>mprotect(0x7f7949afc000, 2097152, PROT_NONE) = 0<br>mmap(0x7f7949cfc000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b6000) = 0x7f7949cfc000<br>mmap(0x7f7949d02000, 16960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f7949d02000<br>close(3) = 0<br>mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f794a625000<br>mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f794a623000<br>arch_prctl(ARCH_SET_FS, 0x7f794a623740) = 0<br>mprotect(0x7f7949cfc000, 16384, PROT_READ) = 0<br>mprotect(0x7f794a007000, 4096, PROT_READ) = 0<br>mprotect(0x7f794a20b000, 4096, PROT_READ) = 0<br>mprotect(0x7f794a40e000, 4096, PROT_READ) = 0<br>mprotect(0x604000, 4096, PROT_READ) = 0<br>mprotect(0x7f794a630000, 4096, PROT_READ) = 0<br>munmap(0x7f794a627000, 32636) = 0<br>brk(0) = 0x60c000<br>brk(0x62f000) = 0x62f000<br>brk(0) = 0x62f000<br>openat(AT_FDCWD, "priv/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3<br>getdents(3, /* 6 entries */, 32768) = 200<br>getdents(3, /* 0 entries */, 32768) = 0<br>close(3) = 0<br>mknod("priv/erlang.pipe.2.r", S_IFIFO|0666) = 0<br>open("priv/erlang.pipe.2.w", O_WRONLY|O_NONBLOCK) = -1 ENOENT (No such file or directory)<br>mknod("priv/erlang.pipe.2.w", S_IFIFO|0666) = 0<br>open("/dev/ptmx", O_RDWR) = 3<br>statfs("/dev/pts", {f_type="DEVPTS_SUPER_MAGIC", f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0<br>ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0<br>ioctl(3, TIOCGPTN, [1]) = 0<br>stat("/dev/pts/1", {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 1), ...}) = 0<br>ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0<br>ioctl(3, TIOCGPTN, [1]) = 0<br>stat("/dev/pts/1", {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 1), ...}) = 0<br>getuid() = 998<br>socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 4<br>connect(4, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)<br>close(4) = 0<br>socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 4<br>connect(4, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)<br>close(4) = 0<br>open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 4<br>fstat(4, {st_mode=S_IFREG|0644, st_size=1728, ...}) = 0<br>mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f794a62e000<br>read(4, "#\n# /etc/nsswitch.conf\n#\n# An ex"..., 4096) = 1728<br>read(4, "", 4096) = 0<br>close(4) = 0<br>munmap(0x7f794a62e000, 4096) = 0<br>open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 4<br>fstat(4, {st_mode=S_IFREG|0644, st_size=32636, ...}) = 0<br>mmap(NULL, 32636, PROT_READ, MAP_PRIVATE, 4, 0) = 0x7f794a627000<br>close(4) = 0<br>open("/lib64/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 4<br>read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\"\0\0\0\0\0\0"..., 832) = 832<br>fstat(4, {st_mode=S_IFREG|0755, st_size=58288, ...}) = 0<br>mmap(NULL, 2144360, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f794973a000<br>mprotect(0x7f7949745000, 2093056, PROT_NONE) = 0<br>mmap(0x7f7949944000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0xa000) = 0x7f7949944000<br>close(4) = 0<br>mprotect(0x7f7949944000, 4096, PROT_READ) = 0<br>munmap(0x7f794a627000, 32636) = 0<br>open("/etc/group", O_RDONLY|O_CLOEXEC) = 4<br>fstat(4, {st_mode=S_IFREG|0644, st_size=591, ...}) = 0<br>mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f794a62e000<br>read(4, "root:x:0:\nbin:x:1:\ndaemon:x:2:\ns"..., 4096) = 591<br>close(4) = 0<br>munmap(0x7f794a62e000, 4096) = 0<br>chown("/dev/pts/1", 998, 5) = -1 EPERM (Operation not permitted)<br>close(3) = 0<br>open("/dev/ptmx", O_RDWR) = 3<br>ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0<br>ioctl(3, TIOCGPTN, [1]) = 0<br>stat("/dev/pts/1", {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 1), ...}) = 0<br>getuid() = 998<br>chown("/dev/pts/1", 998, 5) = -1 EPERM (Operation not permitted)<br>close(3) = 0<br>open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 3<br>fstat(3, {st_mode=S_IFREG|0644, st_size=118, ...}) = 0<br>fstat(3, {st_mode=S_IFREG|0644, st_size=118, ...}) = 0<br>mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f794a62e000<br>read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\1\0\0\0\0"..., 4096) = 118<br>lseek(3, -62, SEEK_CUR) = 56<br>read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\1\0\0\0\0"..., 4096) = 62<br>close(3) = 0<br>munmap(0x7f794a62e000, 4096) = 0<br>getpid() = 5161<br>write(2, "run_erl:187 [5161] Sat Sep 27 09"..., 44run_erl:187 [5161] Sat Sep 27 09:19:59 2014<br>) = 44<br>write(2, "errno=1 'Operation not permitted"..., 60errno=1 'Operation not permitted'<br>Could not open pty master<br>) = 60<br>exit_group(1) = ?<br>+++ exited with 1 +++<br></div><div class="gmail_extra"><br><div class="gmail_quote">2014-09-26 22:39 GMT+02:00 Antoine Koener <span dir="ltr"><<a href="mailto:antoine.koener@gmail.com" target="_blank">antoine.koener@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>Hello, why do you not just run strace to see ?</div><div><div class="h5"><div><br>On 26 Sep 2014, at 18:12, Iván Martínez <<a href="mailto:ivan.martinez@iberlang.com" target="_blank">ivan.martinez@iberlang.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div><div>I have done chmod 777 to /dev, /dev/pty*, /dev/pts and /dev/pts/* and it didn't help. Must be something different from file access permits. Anybody has a clue of what run_erl does and requires?.<br></div>Thank you,<br></div>Ivan<br></div><div class="gmail_extra"><br><div class="gmail_quote">2014-09-25 10:41 GMT+02:00 Iván Martínez <span dir="ltr"><<a href="mailto:ivan.martinez@iberlang.com" target="_blank">ivan.martinez@iberlang.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thank you. Looks like SELinux has nothing to do with the issue:<br><div><br>$ setenforce 0<br>setenforce: SELinux is disabled<br><br></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2014-09-25 3:21 GMT+02:00 zxq9 <span dir="ltr"><<a href="mailto:zxq9@zxq9.com" target="_blank">zxq9@zxq9.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>On Wednesday 24 September 2014 21:00:32 Iván Martínez wrote:<br>
> Hello all,<br>
> Does anyone know why I'm having the following issue with a CentOS 7 system<br>
> with kernel 3.10.23?:<br>
><br>
> $ run_erl priv/ log "erl"<br>
> run_erl:187 [6505] Wed Sep 24 18:42:39 2014<br>
> errno=1 'Operation not permitted'<br>
> Could not open pty master<br>
><br>
> It works as super user. It also works in a Fedora 20 system with kernel<br>
> 3.16. I couldn't find any difference in user groups or /dev file permits<br>
> between both systems. Starting with a user with UID above or below UID_MIN<br>
> doesn't make any difference. I don't think it matters, but the only<br>
> difference I could find is that the CentOS has many /dev/pty* files already<br>
> created, while the Fedora doesn't have any.<br>
<br>
</div></div>You might be running into SELinux permission issues. To find out try doing<br>
"setenforce 0" and then running it again. If that works, use a tool like<br>
audit2allow or audit2why to create a policy that will permit the actions you<br>
require to run your program. I haven't kept up with the Fedora/RHEL world<br>
since 7 came out, but Dan Walsh's blog and Red Hat's SELinux docs have been<br>
good resources on this in the past.<br>
<br>
Of course, you might have a totally different issue, but SELinux booleans and<br>
audit logs are the first thing I check on a Fedora-type distro when something<br>
doesn't work but looks like it should.<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>erlang-questions mailing list</span><br><span><a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a></span><br><span><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a></span><br></div></blockquote></div></div></div></blockquote></div><br></div>