Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8013

Networking and servers • Re: Samba Connect

$
0
0

Do not share anything in a users home directory. Nowadays a users home directory gets 0700 permissions, that is, the user gets full control of their home directory and no other person can enter it.
Thanks,
I have checked the permissions and ownership of the /home/pi directory and they are 700 and pi.
If you check the permissions on / and /home, they should be 'drwxr-xr-x'. The first letter 'd' tells you it is a directory and the rest gives the permissions for owner, group and others, in that order. The first three 'rwx' allows the owner to 'read, write and traverse' the directory, the second three 'r-x' allows the group to 'read and traverse' the directory and the final three 'r-x' allows 'others' to 'read and traverse the directory.

The 'x' on a directory means traverse, unless the user connecting has that 'x' in some way, they cannot enter that directory.

As you have found out, a users home directory gets 'rwx------', this means that only the user can enter it, so anything beneath the users home directory is impossible to get into, no matter what permissions you set on the shares directory. As I said, Samba cannot override the Unix permissions.

There are people that suggest setting 'force user = $USERNAME' (where $USERNAME is the owner of the home directory) and yes this should work, but you might as well just run 'chmod 0777 /home/$USERNAME.

I suggest sharing things from somewhere like /srv.

Statistics: Posted by hortimech — Mon Nov 24, 2025 11:08 am



Viewing all articles
Browse latest Browse all 8013

Trending Articles