i can add new user but i can't access another user directory
$ adduser adminweb
$ passwd adminweb
$ chmod -aG adminweb admin
how i can access directory such as /home/admin/public_html without permission denied, thanks
Add the “adminweb” user to the “admin” group with usermod.
Next, you need to make sure that all the files in the “admin” user’s public_html directory are group owned by “admin”, have g+rw permission, and that the directory itself (and any subdirectories) have g+rwx permissions.
Don’t use chmod 777.
you can try changing the directory's permissions.
$ sudo chmod -R 777 /home/admin/public_html
this makes the directory accessible to any user on the machine or, if you have set up networking, anyone on the network.