2

Here is my problem:

I have created a group allowed

I have set it as primary-group for user1 so after typing groups I see allowed as first one on the list.

I created directory via sudo mkdir dir1 <- it has been created with root as owner and root as group (inside ls -l)

I have typed sudo chgrp allowed dir1 to change dir1's group

All files inside dir1 have been changed by chmod 770 *

but still I have no access to these files -> ls: cannot open directory .: Permission denied

Is there anything I forget about? How to get access for users from the allowed group?
Of course, chmod 777 is out of consideration...

Editing according to @Elder Geek

inside dir1

>ls -al gives:
>"ls: cannot open directory .: Permission denied"


> sudo ls -al gives: 
> d-wx-wx---  2 root allowed   4096 mar  1 23:30 .
> drwxr-xr-x 24 root root      4096 mar  1 23:29 ..
> -rwxrwx---  1 root allowed    123 mar  1 23:30 excluded
> -rwxrwx---  1 root allowed  15964 mar  1 23:30 found inv.log
> -rwxrwx---  1 root allowed    220 mar  1 23:30 old.log

and from 1 level higher:

> ls -al di* (there is only 1 result for di*  -> dir1)
> ls: cannot open directory dir1: Permission denied
Neto
  • 33

1 Answers1

0
d-wx-wx---  2 root allowed   4096 mar  1 23:30 .

That directory doesn't have read permissions for anybody (that's why only root can list contents). Give read access:

sudo chmod ug+r dir1
muru
  • 207,228