# Errno::EACCES - Permission denied while delete a file

**URL:** <https://www.ruby-forum.com/t/errno-eacces-permission-denied-while-delete-a-file/114876>\
**Category:** Rails\
**Created:** [September 18, 2007, 2:03pm UTC](https://www.ruby-forum.com/t/errno-eacces-permission-denied-while-delete-a-file/114876 "2007-09-18T14:03:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vidyagayathri](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ba9def/32.png) [@vidyagayathri](https://www.ruby-forum.com/u/vidyagayathri)\
**Post date:** [September 18, 2007, 2:03pm UTC](https://www.ruby-forum.com/t/errno-eacces-permission-denied-while-delete-a-file/114876/1 "2007-09-18T14:03:41Z")

</div>

hi,

i got the error[Errno::EACCES - Permission denied] , while deleting my  
file, for that while searching i came to know i have to set chmod, but i  
don’t know how to set chmod in my file, if any one knows, how to set  
this one, please let me know, Thanks in advance.

my Error is:

Errno::EACCES in CasesController#delete\_attach  
Permission denied -  
D:/INSTAN~1/rails\_apps/oddworlders/members/OW1/admin/Duplicate Company  
Interchange Aliases.PNGRAILS\_ROOT:  
D:/INSTAN~1/rails\_apps/oddworlders/config/…

Application Trace | Framework Trace | Full Trace  
#{RAILS\_ROOT}/app/controllers/cases\_controller.rb:362:in `delete' #{RAILS_ROOT}/app/controllers/cases_controller.rb:362:in`delete\_attach’

---

<div class="post-metadata">

**Author:** ![vidyagayathri](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ba9def/32.png) [@vidyagayathri](https://www.ruby-forum.com/u/vidyagayathri)\
**Post date:** [September 20, 2007, 5:41pm UTC](https://www.ruby-forum.com/t/errno-eacces-permission-denied-while-delete-a-file/114876/2 "2007-09-20T17:41:50Z")

</div>

hi,  
you can use man chmod if you are in linux,  
example:  
file.txt  
if you want read write permission on file.txt  
chmod u+r+w+x file.txt # this will give permission of read, write,  
execute to only the owner of the file  
chmod g+r+w+x file.txt # this will give permission of read, write,  
execute to only to those users who belong to same group as you  
chmod o+r+w+x file.txt # this will give permission of read, write,  
execute to everyone who can see that file

On Sep 18, 5:03 pm, Vidya V. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
