Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Below is my problem , i am using Amazon linux AMI and there is a directory(Tomcat's webapps). when i try to remove that directory that says permission denied. How So?

[root@ip-10-62-71-179 apache-tomcat-7.0.29]# ls -al
    total 260
    drwxr-xr-x 10 root root  4096 Oct 16 10:29 .
    drwxr-xr-x 13 root root  4096 Oct  3 10:46 ..
    drwxr-xr-x  2 root root  4096 Oct 10 08:14 bin
    drwxr-xr-x  3 root root  4096 Oct  8 07:04 conf
    drwxr-xr-x  2 root root  4096 Aug 28  2012 coupon-images
    drwxr-xr-x  2 root root  4096 Aug 28  2012 lib
    -rw-r--r--  1 root root 56812 Aug 28  2012 LICENSE
    drwxr-xr-x  2 root root 61440 Oct 16 10:09 logs
    -rw-r--r--  1 root root  1192 Aug 28  2012 NOTICE
    -rw-r--r--  1 root root  8826 Aug 28  2012 RELEASE-NOTES
    -rw-r--r--  1 root root 15557 Aug 28  2012 RUNNING.txt
    -rw-r--r--  1 root root 63721 Sep 27 14:10 stacktrace.log
    drwxr-xr-x  3 root root  4096 Aug  2 14:14 temp
    drwxrwxrwx  9 root root  4096 Oct 10 07:33 webapps
    drwxr-xr-x  3 root root  4096 Aug 28  2012 work
    [root@ip-10-62-71-179 apache-tomcat-7.0.29]# chmod 777 webapps/
    chmod: changing permissions of `webapps/': Operation not permitted
    [root@ip-10-62-71-179 apache-tomcat-7.0.29]#

Thanks in advance.

share|improve this question
Looks like root isn't the owner of a folder within webapps. I would resolve that problem. Besides webapps already has global read write and execute drwxrwxrwx permisions – Ramhound Oct 16 '13 at 10:52
i tried as root and non-root (providing only 2 users) they both cant remove anything and cant change permissions – Sachin Verma Oct 16 '13 at 10:55
@Ramhound thanks for taking interest man – Sachin Verma Oct 16 '13 at 10:55
What are the permissions and owner of the contents of that folder. Update your question with that information. The only thing I can see is that you have a / which isn't required and Like I said your changing the permissions on a folder that already has global read write execuate permissions why? – Ramhound Oct 16 '13 at 11:07
@Ramhound hey i am not an expert how to know permissions and owner of directory? and i dont want to change the permission its just whenever i try to delete a file inside that directory -permission denied – Sachin Verma Oct 16 '13 at 11:39

It could be an extended attribute of the filesystem you're using; us lsattr on the file to view the extended attributes, and do man chattr to see what each attribute means. If the file is set as immutable (i), you'll have to remove that attribute before you are able to delete it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.