Cannot access directory through standard user even when permission is given

folderspermissionterminal

I have a directory that I need to use to launch my OpenVPN client in my Mac. It is copied from my Raspberry Pi server through SSH protocol with my root user in Terminal with SCP. However, I need the files inside the directory to be accessed through my standard permissions user account. In Terminal, I ran:

chmod -R 777 /vpn/directory

and I copied the directory to the desktop of my standard user account. However, when I double click the directory, it gives me the error:

The folder can't be opened because you do not have permission to see it's contents.

What do I do?

Best Answer

I solved the problem.

When I ran:

chmod -R 777 /vpn/directory

What I actually ran was:

chmod -R 747 /vpn/directory

So, the group wheel had only read permission. I thought my standard account was not part of the group wheel and I ran

dscacheutil -q group | grep 'wheel' -A 4 

To make sure. I got the output:

name: wheel
password: *
gid: 0
users: root 

--
name: wheel
password: *
gid: 0
users: root 

However, after running:

chmod -R 777 /vpn/directory

I am now able to access the files I need.

Thank you very much.