Hi as the owner of a file and directory I allowed the user TOM to have read permissions to the file :

owner@hostname:~$ getfacl file1

and I gave the user TOM default permissions to read and execute into the directory of that file:

owner@hostname:~$ getfacl /home/owner/docs/

But when I use TOM to try and move into the directory I get denied:

tom@hostname:~$ cd /home/owner/docs
 -bash: cd: /home/owner/docs/:Permission denied

The permissions for the owner are as follows:

owner@hostname:~$ namei -mo /home/owner/docs
 f: /home/owner/docs/
  drwxr-xr-x root root /
  drwxr-xr-x root root home
  drwx------ owner owner owner
  drwxrwxr-x owner owner docs

Can anyone help me set this right? Thank you.

  • What about execute permissions of /home/owner? Please add the output of namei -mo /home/owner/docs. – muru Apr 4 '15 at 5:19
  • Sorry about that I just added the permissions of /home/owner @muru – thankgodforthissite Apr 4 '15 at 5:36

As you can see, /home/owner has absolutely no permissions for any other user. At least give execute permissions so that other users can traverse it to reach subdirectories within:

chmod o+x /home/owner
  • I tried the above command while using OWNER : chmod o+x /home/owner/ but I'm still getting Permission denied when I try to access the file through the directory with TOM. Is the only way to fix this to set the permissions using root? – thankgodforthissite Apr 4 '15 at 6:23
  • @thankgodforthissite you still can't cd to that directory using tom? – muru Apr 4 '15 at 6:26
  • Nope. I tried to do it thru root, and I just found out that the directory for OWNER is encrypted. Could that be the problem? Well...that has to be the problem, if root can't access it then TOM won't be able to. Right? @muru – thankgodforthissite Apr 4 '15 at 6:35
  • @thankgodforthissite yes, but you are working with the unencrypted contents, right? Hasn't OWNER logged in? – muru Apr 4 '15 at 6:36
  • Oh wow... I was logged in as TOM and then I would do: su owner to try to fix it then log off of OWNER. But with OWNER logged in, it worked. Thanks again, appreciate it. @muru – thankgodforthissite Apr 4 '15 at 6:44

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.