# Permission denied: in nginx

**URL:** <https://www.ruby-forum.com/t/permission-denied-in-nginx/208801>\
**Category:** NGINX\
**Created:** [June 27, 2011, 2:20pm UTC](https://www.ruby-forum.com/t/permission-denied-in-nginx/208801 "2011-06-27T14:20:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [June 27, 2011, 2:20pm UTC](https://www.ruby-forum.com/t/permission-denied-in-nginx/208801/1 "2011-06-27T14:20:34Z")

</div>

HI  
I am working on nginx, i am developed an small module to read data from  
an external device. when i call module from the browser i am getting an  
error “Error connecting XXXXX : permission denied”

i tried to change the permission and owner of the file (chown and  
chmod)but still i got same error. can anyone plz help how to move on  
further

Regards  
pavan

Posted at Nginx Forum:

> **[permission denied: in nginx](https://forum.nginx.org/read.php?2,210423,210423#msg-210423)**
>
> HI I am working on nginx, i am developed an small module to read data from an external device. when i call module from the browser i am getting an error "Error connecting XXXXX : permission denied" i tried to change the permission and owner...

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 29, 2011, 12:27pm UTC](https://www.ruby-forum.com/t/permission-denied-in-nginx/208801/2 "2011-06-29T12:27:24Z")

</div>

HI

sorry, i am not getting how to solve the problem.

the worker process of nginx is running in “nobody root” and external  
device is in “root dialout” The add on module is in “user user”.  
I tried to change the permission of the add on module to nobody root and  
root root, both are given same error.  
“ERROR CONNECTING READER : PERMISSION DENIED”

in my system su is not enabling. is it possible when we run the complete  
application on su ?  
is there any other way to solve the above error . can u plz help. (plz  
elaborate the solution)

( plz forgive if there are any grammatical mistakes)

Posted at Nginx Forum:

> **[Re: permission denied: in nginx](https://forum.nginx.org/read.php?2,210423,210982#msg-210982)**
>
> HI I am working on nginx, i am developed an small module to read data from an external device. when i call module from the browser i am getting an error "Error connecting XXXXX : permission denied" i tried to change the permission and owner...

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [July 4, 2011, 1:40pm UTC](https://www.ruby-forum.com/t/permission-denied-in-nginx/208801/3 "2011-07-04T13:40:42Z")

</div>

Thanks , i got solution.

Posted at Nginx Forum:

> **[Re: permission denied: in nginx](https://forum.nginx.org/read.php?2,210423,211929#msg-211929)**
>
> HI I am working on nginx, i am developed an small module to read data from an external device. when i call module from the browser i am getting an error "Error connecting XXXXX : permission denied" i tried to change the permission and owner...

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 27, 2011, 2:46pm UTC](https://www.ruby-forum.com/t/permission-denied-in-nginx/208801/4 "2011-06-27T14:46:30Z")

</div>

maybe it might help to do strace on the nginx process to see the exact  
system call which causes the permission denied. also you have to make  
sure that the user under which nginx runs is allowed to access the  
device file. for example you could test this by doing sudo -u  
nginxuser cat /dev/xxx

On Mon, Jun 27, 2011 at 20:19, removed\_email\_address@domain.invalid
