Как скрыть файлы в Samba

Конфигурирование Файл-сервера (Установка, настройка SAMBA)
Ответить
Аватара пользователя
Роман Торопов
Администратор
Сообщения: 141
Зарегистрирован: 24 мар 2008, 10:49
Откуда: г. Пермь
Контактная информация:

Как скрыть файлы в Samba

Сообщение Роман Торопов » 25 мар 2008, 12:00

Александр писал(а):Может кто сталкивался с такой проблемой:
при открытии любого файла world, exel(например тест.doc появляется файл ~$ест.doc) который после закрытия файла пропадает. окошки 95-xp - скрытые, системные файлы не показывает.
добавил строку в шару: hide files = ~$*.doc ситуация не меняется.
Samba 3.0.13 из дистр ML-2005
Александр писал(а):нарыл, может кому-то понадобится:
hide files = /~*.doc/
# работает!

Аватара пользователя
Роман Торопов
Администратор
Сообщения: 141
Зарегистрирован: 24 мар 2008, 10:49
Откуда: г. Пермь
Контактная информация:

Re: Как скрыть файлы в Samba

Сообщение Роман Торопов » 21 апр 2008, 16:39

Код: Выделить всё

[global]
netbios name = fs
netbios aliases = viagra
server string = Samba 3.014
workgroup = Office

domain master = Yes
domain logons = Yes
ldap ssl = no
admin users = root, @it, Administrator
allow trusted domains = yes

os level = 127
wins support = Yes
lm announce = Yes
wins proxy = Yes

username level = 2
logon script = logon.bat.lnk
logon path = \\%L\profiles\%U
logon drive = H:

security = DOMAIN
null passwords = yes
encrypt passwords = yes
paranoid server security = No
password level = 0

add user script = /usr/sbin/useradd -d /dev/null -g 100 -s /bin/false -M %u
add machine script = /usr/sbin/useradd -d /dev/null -g 3102 -d /dev/null -s /bin/false -M %u
add group script = /usr/sbin/groupadd %g
delete user script = /usr/sbin/userdel %u
delete user from group script = /usr/sbin/deluser %u %g
delete group script = /usr/sbin/groupdel %g

unix charset = KOI8-R
dos charset = CP866

log file = /var/log/samba/log.%m
max log size = 5000
debug level = 4

socket options = IPTOS_LOWDELAY TCP_NODELAY SO_RCVBUF=1048576 SO_SNDBUF=1048576

load printers = No
show add printer wizard = No

[netlogon]
path = /var/lib/samba/netlogon
browseable = No

[profiles]
path = /var/lib/samba/profiles
read only = No
create mask = 0666
directory mask = 0777
browseable = No
veto files = /*.avi/*.mp*

[homes]
comment = Home Directories
path = /var/www/%U/samba
read only = No
create mask = 0660
directory mask = 0770
veto oplock files = /*.xls/*.XLS/*.mdb/*.MDB/*.ldb/*.LDB/
browseable = No
veto files = /*.avi/*.mp?/*.wav/*.scr/*.swf/
delete veto files = yes

[%U]
comment = Home Directories
path = /var/www/%U/samba
admin users =
read only = No
create mask = 0660
directory mask = 0770
veto oplock files = /*.xls/*.XLS/*.mdb/*.MDB/*.ldb/*.LDB/
veto files = /*.avi/*.mp*


Аватара пользователя
Роман Торопов
Администратор
Сообщения: 141
Зарегистрирован: 24 мар 2008, 10:49
Откуда: г. Пермь
Контактная информация:

Re: Как скрыть файлы в Samba

Сообщение Роман Торопов » 21 апр 2008, 17:20

Код: Выделить всё

[global]
        dos charset = CP866
        unix charset = KOI8-R
        workgroup = LACTIS
        server string = Samba Server
        interfaces = eth0, eth1
        security = SHARE
        encrypt passwords = No
        map to guest = Bad User
        log level = 1
        syslog = 0
        log file = /var/log/samba/log.%m
        max log size = 1000
        max mux = 100
        max xmit = 2048
        max open files = 100000
        socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=8192 SO_SNDBUF=8192
        load printers = No
        show add printer wizard = No
        os level = 35
        preferred master = No
        local master = No
        domain master = No
        dns proxy = No
        ldap ssl = no
        invalid users = root
        default case = upper
        level2 oplocks = No
        msdfs root = No

[public]
        comment = Public Test Directory
        path = /var/www/public
        read only = No
        guest ok = Yes

[SysUtil]
        comment = Distribs and Utilities
        path = /var/gg/sysutil
        read only = No
        guest ok = Yes

[DrWeb]
        comment = DrWeb
        path = /var/DrWeb
        read only = No
        guest ok = Yes
        oplocks = No
        strict locking = Yes

[coplus]
        comment = Cons Plus
        path = /var/g/coplus
        read only = No
        guest ok = Yes

[zu]
        comment = Public Dir
        path = /var/shares/zu
        read only = No
        guest ok = Yes

[distr]
        comment = Distr
        path = /var/www/distr
        read only = No
        guest ok = Yes

[sb]
        comment = Absoft
        path = /var/share/absoft
        read only = No
        guest ok = Yes
        veto oplock files = /*.DBF/*.dbf/*.ntx/*.NTX/*.mem/*.MEM/*.T/*.t/
        browseable = No
        oplocks = No
        strict locking = Yes

[saldo]
        comment = saldo
        path = /var/share/share/saldo
        read only = No
        guest ok = Yes
        browseable = No

[lab]
        comment = lab-sgp
        path = /var/share/share/lab
        read only = No
        guest ok = Yes
        browseable = No
        strict locking = Yes

[hh]
        comment = hh
        path = /var/shares/absoft
        read only = No
        guest ok = Yes
        browseable = No
        oplocks = No

[hha]
        comment = hha
        path = /var/h/hha
        read only = No
        guest ok = Yes
        browseable = No
        oplocks = No

[test2]
        comment = only test
        path = /var/h/test
        read only = No
        guest ok = Yes
        browseable = No
        oplocks = No
        strict locking = No
        fstype = FAT

[test3]
        comment = only test
        path = /var/gg/test
        read only = No
        guest ok = Yes
        browseable = No
        oplocks = No
        strict locking = Yes
        fstype = FAT

[test4]
        comment = only test
        path = /var/gg/test2
        read only = No
        guest ok = Yes
        browseable = No
        blocking locks = No
        locking = No
        oplocks = No
        posix locking = No
        strict locking = No

[prog]
        comment = prog
        path = /var/h/share/prog
        read only = No
        guest ok = Yes
        browseable = No
        strict locking = Yes

[pred]
        comment = pred
        path = /var/h/share/dautov
        read only = No
        guest ok = Yes
        veto oplock files = /*.DBF/*.dbf/*.ntx/*.NTX/*.mem/*.MEM/
        browseable = No
        strict locking = Yes

[zmoloko]
        comment = zmoloko
        path = /var/h/share/zmoloko
        read only = No
        guest ok = Yes
        veto oplock files = /*.DBF/*.dbf/*.ntx/*.NTX/*.mem/*.MEM/
        browseable = No
        strict locking = Yes

[sprav]
        comment = sprav
        path = /var/h/ab_sprav
        read only = No
        guest ok = Yes
        veto oplock files = /*.DBF/*.dbf/*.ntx/*.NTX/*.mem/*.MEM/
        browseable = No
        strict locking = Yes

[spr_k]
        comment = spr_k
        path = /var/h/ab_s_kas
        read only = No
        guest ok = Yes
        veto oplock files = /*.DBF/*.dbf/*.ntx/*.NTX/*.mem/*.MEM/
        browseable = No
        strict locking = Yes

[oit]
        comment = oit
        path = /var/hh/disk_oit
        read only = No
        guest ok = Yes
        browseable = No

[komsl]
        comment = komsl
        path = /var/hh/disk_komsl
        read only = No
        guest ok = Yes
        browseable = No

[logsl]
        comment = logsl
        path = /var/hh/logsl
        read only = No
        guest ok = Yes
        browseable = No

[opr]
        comment = opr
        path = /var/hh/opr
        read only = No
        guest ok = Yes
        browseable = No
        oplocks = No

[logoscreen]
        comment = logscreen
        path = /var/hh/logoscreen
        read only = No
        guest ok = Yes
        browseable = No

[qualsl]
        comment = qualsl
        path = /var/hh/qualsl
        read only = No
        guest ok = Yes
        browseable = No

[qualsl2]
        comment = qualsl2
        path = /var/hh/qualsl2
        read only = No
        guest ok = Yes
        browseable = No

[tehsl]
        comment = tehsl
        path = /var/hh/tehsl
        read only = No
        guest ok = Yes
        browseable = No

[ursl]
        comment = ursl
        path = /var/hh/ursl
        read only = No
        guest ok = Yes
        browseable = No

[adminsl]
        comment = adminsl
        path = /var/hh/adminsl
        read only = No
        guest ok = Yes
        browseable = No

[printers]
        comment = All Printers
        path = /var/spool/samba
        guest ok = Yes
        printable = Yes
        use client driver = Yes
        browseable = No


Аватара пользователя
Роман Торопов
Администратор
Сообщения: 141
Зарегистрирован: 24 мар 2008, 10:49
Откуда: г. Пермь
Контактная информация:

Re: Как скрыть файлы в Samba

Сообщение Роман Торопов » 21 апр 2008, 17:28

Код: Выделить всё

[base$]
        browseable = no
        delete readonly = yes
        writeable = yes
        path = /var/www/samba/base
        force user = root
        force group = root
        guest ok = yes
        create mask = 0660
        directory mask = 0770
        inherit permissions = Yes
        use sendfile = Yes
        veto oplock files = /*.LCK/*.lck/*.MD/*.md/*.cdx/*.CDX/*.dbf/*.DBF/
        blocking locks = No
        csc policy = disable
        fake oplocks = Yes
        oplock contention limit = 1
        strict locking = No
        dos filetime resolution = Yes
        write cache size = 262144

Аватара пользователя
Роман Торопов
Администратор
Сообщения: 141
Зарегистрирован: 24 мар 2008, 10:49
Откуда: г. Пермь
Контактная информация:

Re: Как скрыть файлы в Samba

Сообщение Роман Торопов » 22 апр 2008, 14:42

Код: Выделить всё

[SOUND]
path = /mnt/sde/music
comment = звуковой-сервер
username = roma,vnelubin,gtcvet,eolax,mlapin,kkorobejnikov
only user = yes
public = yes
writable = yes
create mode = 0775
force create mode = 0775
directory mode = 0775
force directory mode = 0775
veto oplock files = /*.mp3/*.wav/*.nfo/*.jp*/*.cue/
veto files = /*.a*/*.b*/*.d*/*.e*/*.f*/*.g*/*.h*/*.i*/*.k*/*.l*/*.o*/*.p*/*.q*/*.r*/*.s*/*.t*/*.u*/*.y*/*.v*/*.x*/*.z*/*.1*/*.2*/*.3*/*.4*/*.5*/*.6*/*.7*/*.8*/*.9*/*.0*/*.ca*/*.cb*/*.cc*/*.cd*/*.ce*/*.cf*/*.cg*/*.ch*/*.ci*/*.cj*/*.ck*/*.cl*/*.cm*/*.cn*/*.co*/*.cp*/*.cq*/*.cr*/*.cs*/*.ct*/*.cv*/*.cw*/*.cx*/*.cy*/*.cz*/*.c1*/*.c2*/*.c3*/*.c4*/*.c5*/*.c6*/*.c7*/*.c8*/*.c9*/*.c0*/*.ja*/*.jb*/*.jc*/*.jd*/*.je*/*.jf*/*.jg*/*.jh*/*.ji*/*.jj*/*.jk*/*.jl*/*.jm*/*.jn*/*.jo*/*.jq*/*.jr*/*.js*/*.jt*/*.ju*/*.jv*/*.jw*/*.jx*/*.jy*/*.jz*/*.j1*/*.j2*/*.j3*/*.j4*/*.j5*/*.j6*/*.j7*/*.j8*/*.j9*/*.j0*/*.ma*/*.mb*/*.mc*/*.md*/*.me*/*.mf*/*.mg*/*.mh*/*.mi*/*.mj*/*.mk*/*.ml*/*.mm*/*.mn*/*.mo*/*.mq*/*.mr*/*.ms*/*.mt*/*.mu*/*.mv*/*.mw*/*.mx*/*.my*/*.mz*/*.m1*/*.m2*/*.m3*/*.m4*/*.m5*/*.m6*/*.m7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