Lost access to /home/xxx shares in samba and ftp

After working on the server the smb and ftp access to the /home dir shares give access denied.

The shares on the /srv/www is no problem.

home and srv are on separed partitions.

[2024/10/20 01:49:19.802962, 0] …/…/source3/smbd/smb2_service.c:117(chdir_current_service)
chdir_current_service: vfs_ChDir(/home/robkalmeijer) failed: Permission denied. Current token: uid=1000, gid=1000, 2 groups: 1000 100

The samba server has worked perfect.

Was working on the apache server when things started.

Working on the server is no problem.

Windows cannot make connection to /home/robkalmeijer, /home/users, /home/public shares
www1 and www2 no problem.

Started with [2024/10/20 00:04:13.647912, 0] …/…/source3/nmbd/nmbd_namequery.c:109(query_name_response)
query_name_response: Multiple (2) responses received for a query on subnet 192.168.1.15 for name KALMEIJER<1d>.
This response was from IP 192.168.1.58, reporting an IP address of 192.168.56.1.

Restarting stoped it.

[global]
workgroup = KALMEIJER
server string = Samba %v
netbios name = server5
hosts allow = 127.0.0.1/8 192.168.1.0/24
hosts deny = 0.0.0.0/0
security = user
guest account = nobody
passdb backend = tdbsam
follow symlinks = yes
wide links = yes
unix extensions = no
keep alive = 30
os level = 255
wins support = yes
local master = yes
domain master = false

[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = no
writeable = yes
create mask = 0660
directory mask = 0770

[users]
comment = Voor systeem users toegangelijk
path = /home/users
browseable = yes
writable = yes
create mask = 0660
directory mask = 0770
force group = users

[public]
comment = Public shares
path = /home/public
public = yes
writable = no
printable = no
create mask = 664
directory mask = 775
force group = users
write list = +users

[www0]
comment = default server5
path = /srv/www/default/httpsdocs
writeable = yes
browseable = yes
create mask = 644
directory mask = 755

[www1]
comment = www.robkalmeijer.nl
path = /srv/www/vhosts/www.robkalmeijer.nl/httpsdocs
writeable = yes
browseable = yes
create mask = 644
directory mask = 755

[www2]
comment = prive.robkalmeijer.nl
path = /srv/www/vhosts/prive.robkalmeijer.nl/httpsdocs
writeable = yes
browseable = yes
create mask = 644
directory mask = 755

On windows:
Z is \192.168.1.15\robkalmeijer
Y is \192.168.1.15\www1
etc.

What permissions are set on /home and /home/robkalmeijer ?

Is ‘robkalmeijer’ a Samba user ?

Also, are you aware that your ‘[public]’ share isn’t actually public ?

1 Like

Check directory permissions:
Verify that the directories under /home (e.g., /home/robkalmeijer, /home/user, /home/public) have the appropriate read/write permissions as required by the Samba configuration:

ls -ld /home/robkalmeijer /home/user /home/public

Update:

Working on the /home partition with:
SSH no problem.
Mounting with NFS on other linux machine no problem
Mounting with CIFS access denied with ALL subdirs
Mounting with CIFS works on www shares
FTP access denied.

There must be something with SELinux settings

SSH access to my accout failled to so I have add it again after removing it.

The home dir is still not accessible but /home/users and /home/puplic are again.

Set smbpasswd again also.

If it is, then it is easy to prove, set ‘SELINUX=disabled’ in /etc/sysconfig/selinux and reboot, if everything now works, it is Selinux, but don’t forget to put Selinux back to ‘enforcing’.

Provide the smb.conf you posted earlier is what is on disk, then I am willing to put money on your ‘public’ share not being public.

SOLVED

Last thing to do was to chown was set to root:root not robkalmeijer:robkalmeijer

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.