samba home folder unable to list, create or edit files and folders
0
votes
1
answer
29
views
I have shared my home folder over samba as follows:
when i try to create folders from windows I get error "cant create" but folder is created. But permissions are all messed up.
file is also created but permissions are messed up.
As a result I am not able to open/edit these files or folders from windows.
$ ls -lZ
total 48
d-------w-. 2 sar sar system_u:object_r:samba_share_t:s0 4096 May 27 02:01 'New folder'
d-------w-. 2 sar sar system_u:object_r:samba_share_t:s0 4096 May 27 02:01 'New folder (2)'
d-------w-. 2 sar sar system_u:object_r:samba_share_t:s0 4096 May 27 02:01 'New folder (3)'
--------w-. 1 sar sar system_u:object_r:samba_share_t:s0 0 May 27 02:01 'New Text Document.txt'
setup process:
# setsebool samba_enable_home_dirs=1
# chcon -R -t samba_share_t /home/sar
cfg:
[global]
workgroup = mywg
security = user
server string = Samba Server %v
netbios name = myserver
map to guest = bad user
passdb backend = tdbsam
# interfaces = 192.168.xx.xx/255.255.255.0
# bind interfaces only = yes
# Debug logging information #log level 0 none, 3=HUGE
log level = 1
log file = /var/log/samba/%m.samba.log
max log size = 50
debug timestamp = yes
# security setup
server min protocol = SMB3
# server max protocol = SMB3
# SMB3_00: Windows 8, SMB3_02: Windows 8.1, SMB3_10: early Windows 10, SMB3_11: Windows 10 default is SMB3_11
ntlm auth = yes
lanman auth = no
printing = cups
printcap name = cups
load printers = yes
cups options = raw
[homes]
comment = Home Directories
valid users = %S, %D%w%S
read only = No
inherit acls = Yes
browseable = yes
path = /home/%S
create mask = 0644 #0002
directory mask = 0755 #002
I want users to be able to create, add/edit files and folders in their home folders freely. which should not be be accessible to others.
Asked by Rajeev
(256 rep)
May 27, 2025, 02:14 AM
Last activity: May 27, 2025, 04:57 AM
Last activity: May 27, 2025, 04:57 AM