There are two linux usersclouderaomegaBoth the above users are under the group batchusers        [omega@node1 projects]$ ls -ltrdrwxrwsr-x+  9 cloudera        batchusers        4096 May  5 10:53  omega_events[omega@node1 projects]$ cd omega_eventsbash: cd: omega_events: Permission denied[omega@node1 projects]$ cd omega_eventsbash: cd: omega_events: Permission denied[omega@node1 projects]$I see that omega user is not able to access the folder omega_events hence I logged in as cloudera user and gave 777 permission to omega user [cloudera@node1 projects]$ chmod 777 omega_events [cloudera@node1 projects]$ ls -ltrdrwxrwsrwx+  9 cloudera        batchusers        4096 May  5 10:53 omega_eventsAfter that I logged in as omega user ,but still i am not able to access the folder omega_events[omega@node1 projects]$ ls -ltrdrwxrwsrwx+  9 cloudera        batchusers        4096 May  5 10:53   omega_events[omega@node1 projects]$ cd omega_eventsbash: cd: omega_events: Permission denied[omega@node1 projects]$[omega@node1 projects]$ id omegauid=1928292922(omega) gid=1928292922(omega) groups=1928292922(omega),1478288372(cc-manager),1478288372(batchusers),1478221121(emerge),1438902221(data_analytics)[omega@node1 projects]$ getfacl omega_events # file: omega_events # owner: cloudera # group: batchusers user::rwx user:omega:rw- group::r-x group:batchusers:rw- mask::rwx other::rwx default:user::rwx default:user:omega:rw- default:group::r-x default:group:batchusers:rw- default:mask::rwx default:other::r-xCould some one help me on this
Not able to access a Linux directory
linux
Removing the set-group-ID bitchmod preserves set-group-ID bits unless you explicitly clear them, so chmod 777 omega_events did not help.You need instead to clear the set-group-ID bit as cloudera and then repeat chmod to give traversal rights (x) to all batchusers.[cloudera@node1 projects]$ chmod g-s omega_events [cloudera@node1 projects]$ chmod 775 omega_events After this you should get[cloudera@node1 projects]$ ls -ltrdrwxrwxr-x+  9 cloudera        batchusers        4096 May  5 10:53 omega_eventsFixing Access Control ListsAnother issue is that you have Access control lists on omega_events. This is indicated by a + sign at the end of the mode line.The following rules cause permission denied to user omegauser:omega:rw-group:batchusers:rw-You can remove them with[cloudera@node1 projects]$ setfacl -x u:omega omega_events[cloudera@node1 projects]$ setfacl -x g:batchusers omega_eventsYou should get[cloudera@node1 projects]$ getfacl omega_events # file: omega_events # owner: cloudera # group: batchusers user::rwx group::r-x mask::rwx other::rwx default:user::rwx default:user:omega:rw- default:group::r-x default:group:batchusers:rw- default:mask::rwx default:other::r-xAlso to remove default ACLs use the following command[cloudera@node1 projects]$ setfacl -k omega_events