我正在尝试获取 samba 共享设置,以便用户拥有读取和写入权限。我认为我可以通过编辑 /etc/samba/smb.conf 添加我的共享来做到这一点,如下所示:
[CLOUD]
path = /cloud
writable = yes
security = user
valid users = neon, win
write list = neon, win
然后运行:
$ sudo systemctl restart smb.service
$ sudo systemctl restart nmb.service
我可以从这两个帐户访问我的共享,但都不能写入。当我运行 testparam 时,某些参数丢失(security
和writable
,但没有明确的错误。
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[homes]"
Processing section "[printers]"
Processing section "[CLOUD]"
Global parameter security found in service section!
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
# Global parameters
[global]
dns proxy = No
log file = /usr/local/samba/var/log.%m
max log size = 50
server role = standalone server
server string = Samba Server
workgroup = MYGROUP
idmap config * : backend = tdb
[homes]
browseable = No
comment = Home Directories
read only = No
[printers]
browseable = No
comment = All Printers
path = /usr/spool/samba
printable = Yes
[CLOUD]
path = /cloud
read only = No
valid users = neon win
write list = neon win
我认为这意味着该writable = yes
参数未被识别,但由于没有错误,我不知道为什么。关于这里可能发生的事情有什么建议吗?我正在使用阿奇。
答案1
尝试这个:
[CLOUD]
writeable = yes
path = /cloud
valid users = neon,win
重新启动smbd
当您以 neon 或 win 用户身份登录时,还可以直接在 Linux 系统中检查读/写权限。
我经常需要在 Windows 中注销/重新登录