I have some folders with account/user "OpenERP" and i created new folder (web_theme) under this directory . When i try to open/read this folder (web_theme) it throws "Do not have the Permissions"

I have pointed new folder is in root

drwxrwxr-x 7 openerp openerp 4096 Oct  7 10:25 web
drwxrwxr-x 4 openerp openerp 4096 Oct  7 10:30 web_calendar
drwxrwxr-x 4 openerp openerp 4096 Oct  7 10:30 web_rpc
drwxrwxr-x 4 openerp openerp 4096 Oct  7 10:30 web_tests
drwx------ 4 root    root    4096 Oct 18 02:42 web_theme

Tried below commands

su/sudo chmod -R 0770 web_theme
chmod -R 0755 web_theme
chmod 666 web_theme

It Throws Error:

chmod: changing permissions of `web_theme': Operation not permitted
chmod: cannot read directory `web_theme': Permission denied

How do i resolve.

2 Answers 2


You were close. Try

sudo chmod -R 0755 web_theme

As root own the file, it must be root who runs chmod, so you have to use sudo

About your tries:

  • sudo chmod -R 0770 web_theme allows root user and root group to read the directory, but other user do not have any permission
  • chmod -R 0755 web_theme does not work because only the file owner (root) can change permissions, thus the chmod: changing permissions ofweb_theme': Operation not permitted`
  • chmod 666 web_theme does not work because only the file owner (root) can change permissions, but even without that, if the execute permission was missing (0666) then you would not be allowed to search into the directory. You would have to use 0777, but this is too permissive as you give write permission. The best is to give 0755 permission: root can read/write/search, other can read/search.
  • openerp@vv:~/instances/openerp/webclient/addons$ sudo chmod -R 0755 web_theme Sorry, user openerp is not allowed to execute '/bin/chmod -R 0755 web_theme' as root on vv.
    – Silviaa
    Oct 23, 2013 at 7:33
  • 1
    Login as your own user or root user and try again.
    – bayindirh
    Oct 23, 2013 at 7:36
  • Thank You. It Works like openerp@vv:~/instances/openerp/webclient$ su Password: root@vv:/instances/openerp/webclient# chmod -R 0755 addons/web_theme ..
    – Silviaa
    Oct 23, 2013 at 8:04

an addon to cbliard's answer:

if you find the numeric notation of permissions a bit tedious, you can also use a symbolic form (which i find easier to read). the following will allow all users (that is: the owner of the file, it's group and all others) to both read all files/directories within web_theme and to execute these files/directories. the capital X will make sure that only those files/dirs are marked executable that are already executable "for some user". in practice this means that it will mark directories as "executable" (which is needed to traverse them), but not ordinary files:

 chmod -R a+rX web_theme

as cbliard has stated you have to be superuser (root) or the owner of the files/directories (in this case this is also root) to run this command. since sudo seems to be forbidden for this particular task on your machine, try something like:

 openerp@vv:~$ cd ~/instances/openerp/webclient/addons/web_theme
 openerp@vv:...$ su
 root@vv:...# chmod -R a+rX 
  • @Selvi rather than adding a "thanks" comment, you might upvote questions that were helpful and accept the answer you found best.
    – umläute
    Oct 23, 2013 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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