Like in the title, I want to get folder on my samba server, which allow anyone (guest, user nevermind) to upload files. Than files should be invisible for any other than host. The best would be option with prohibiting users and guests from editing, viewing or deleting files, but it isn't necessarily. I tried some ways. First of them, like someone wrote somewhere I used to do like this, using masks and files permissions, it doesn't work, anybody can do anything with files on the server. Of course, we are interested in "Wgrane" folder :P .
[global]
netbios name = serwer
server string = Samba file and print server
workgroup = Workgroup
security = user
hosts allow = 127. 192.168.0.
interfaces = 127.0.0.1/8 192.168.0.0/24
bind interfaces only = yes
remote announce = 192.168.0.255
remote browse sync = 192.168.0.255
printcap name = cups
load printers = yes
cups options = raw
printing = cups
guest account = smbguest
map to guest = Bad Password
obey pam restrictions = yes
log file = /var/log/samba/samba.log
max log size = 1000
null passwords = yes
username level = 0
password level = 0
encrypt passwords = yes
unix password sync = yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
local master = no
domain master = no
preferred master = no
domain logons = no
os level = 33
logon drive = m:
logon home = \\%L\homes\%u
logon path = \\%L\profiles\%u
logon script = %G.bat
time server = no
name resolve order = wins lmhosts bcast
wins support = no
wins proxy = no
dns proxy = no
preserve case = no
client use spnego = no
client signing = no
client schannel = no
server signing = no
server schannel = no
nt pipe support = yes
nt status support = yes
allow trusted domains = no
obey pam restrictions = yes
enable spoolss = yes
client plaintext auth = no
disable netbios = no
follow symlinks = no
update encrypted = yes
pam password change = no
passwd chat timeout = 120
hostname lookups = no
username map = /etc/samba/smbusers
passdb backend = tdbsam
passwd program = /usr/bin/passwd '%u'
passwd chat = *New*password* %n\n *ReType*new*password* %n\n *passwd*changed*\n
add user script = /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null '%u'
add user to group script = /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null -g '%g' '%u'
add group script = /usr/sbin/groupadd '%g'
delete user script = /usr/sbin/userdel '%u'
delete user from group script = /usr/sbin/userdel '%u' '%g'
delete group script = /usr/sbin/groupdel '%g'
add machine script = /usr/sbin/useradd -d /dev/null -g sambamachines -c 'Samba Machine Account' -s /dev/null -M '%u'
machine password timeout = 120
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
template shell = /dev/null
winbind use default domain = yes
winbind separator = @
winbind cache time = 360
winbind trusted domains only = yes
winbind nested groups = no
winbind nss info = no
winbind refresh tickets = no
winbind offline logon = no
host msdfss = no
usershare allow guests = yes
[krzysztofonly]
path = /home/krzysztof/Publiczny/Serwer
comment = Serwer tylko dla usera krzysztof.
valid users = krzysztof
write list = krzysztof
read only = no
available = yes
browseable = yes
writable = yes
guest ok = no
public = yes
printable = no
locking = no
strict locking = no
[Do pobrania]
path = /home/krzysztof/Publiczny/Do pobrania
comment = Lokalizacja tylko do pobierania plików z serwera.
read only = yes
available = yes
browseable = yes
writable = no
guest ok = yes
public = yes
printable = no
locking = yes
strict locking = yes
[Wgrane]
path = /home/krzysztof/Publiczny/Wgrane
comment = Lokalizacja do wgrywania plików na serwer. Nie mogą one być później edytowane.
force directory mode = 2770
create mask = 660
read only = no
available = yes
browsable = yes
guest ok = yes
public = yes
valid users = @U smbguest
force user = krzysztof
Second way I used to try was something like this.
[Wgrane]
path = /home/krzysztof/Publiczny/Wgrane
comment = Lokalizacja do wgrywania plików na serwer. Nie mogą one być później edytowane.
read only = no
available = yes
browsable = yes
guest ok = yes
public = yes
veto files = /*/
delete veto files = no
Just veto which should hide all files and everything should be fine. Or maybe I have bad understanding of this attribution? Right - files are hidden, but there is no way to upload files. There is an error: http://i.imgur.com/vWKlloO.png
Standard Windows error. "Could not find this item. This is no longer located...", BUT the file is fully accessible but can't be dropped to the server.
Can somebody tip me how to fix error in second way or tell me why the first isn't working?
@edit I learn more and now I understand how veto files works. I need to make something like veto, but with upload allowed. Is it even possible?
0 Answers