View previous topic :: View next topic |
Author |
Message |
pascalbrax Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/9174105014148257426517.jpg)
Joined: 21 Jan 2004 Posts: 280 Location: 127.0.0.1
|
Posted: Mon Jul 19, 2004 8:23 pm Post subject: [SAMBA] shares in read-only [RISOLTO] |
|
|
ho creato una macchina nuova di zecca, ci ho messo apache e samba e il minimo indispensabile.
per samba, ho seguito questo howto: http://www.gentoo.org/doc/en/quick-samba-howto.xml
ho saltato la parte cups e antivirus perche' non m'interessavano
sono riuscito a configurare gli shares in modo che vengano visti da windows... oddio... visti... devo fare \\ip.del.pc.samba anziche' \\nome.del.pc.samba ma questo non e' un problema primario
(si, i 2 pc: windows e linux hanno lo stesso workgroup)
il problema e' che gli share sono tutti in sola lettura, mentre io vorrei che fossero anche "scrivibili". ho cercato sul forum vari hints, ho aggiunto la stringa agli shares, ma non va.
questo e' il mio smb.conf:
Code: | [global]
workgroup = STARS
server string = Samba Server %v
log file = /var/log/samba/log.%m
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
interfaces = lo eth0
bind interfaces only = yes
#hosts allow = 127.0.0.1 192.168.1.0/24
#hosts deny = 0.0.0.0/0
# The default is user
security = share
# No passwords, so we're going to use a guest account!
guest account = samba
guest ok = yes
# unix extensions = yes
# We create a new share that we can read/write to from anywhere
# This is kind of like a public temp share, anyone can do what
# they want here.
[public]
comment = Public Files
browseable = yes
public = yes
create mode = 0766
guest ok = yes
path = /home/samba/public
writeable = yes |
il risultato e' che posso accedere agli share da windows ma se provo a creare un file mi da accesso negato, nei logs non appare nulla di interessante apparte
Code: | [2004/07/19 21:57:59, 1] smbd/service.c:make_connection_snum(619)
192.168.0.2 (192.168.0.2) connect to service public initially as user samba (uid=1002, gid=100) (pid 610)
[2004/07/19 21:57:59, 0] smbd/service.c:set_current_service(56)
chdir (/home/samba/public) failed
[2004/07/19 21:57:59, 0] smbd/service.c:set_current_service(56)
chdir (/home/samba/public) failed
[2004/07/19 21:58:00, 0] smbd/service.c:set_current_service(56)
chdir (/home/samba/public) failed
...
|
dove sbaglio? _________________ "One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler
Last edited by pascalbrax on Mon Jul 19, 2004 8:43 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
xchris Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/212070142342d3867489e82.jpg)
Joined: 10 Jul 2003 Posts: 2824
|
Posted: Mon Jul 19, 2004 8:33 pm Post subject: |
|
|
hai controllato i permessi sulla dir sharata?
ciao _________________ while True:Gentoo() |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pascalbrax Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/9174105014148257426517.jpg)
Joined: 21 Jan 2004 Posts: 280 Location: 127.0.0.1
|
Posted: Mon Jul 19, 2004 8:41 pm Post subject: |
|
|
come da howto, ho fatto chmod 755 sulle varie dir.
ora per prova ho fatto chmod 777 e funziona anche in scrittura... mah
grazie! ![Very Happy :D](images/smiles/icon_biggrin.gif) _________________ "One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
xchris Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/212070142342d3867489e82.jpg)
Joined: 10 Jul 2003 Posts: 2824
|
Posted: Mon Jul 19, 2004 8:44 pm Post subject: |
|
|
il punto e' che accedi come guest (e sembra che ti mappi come user samba).
Togli l'accesso pubblico e configurati il tuo user
A quel punto puoi rimettere 755 (o anche + conservativo)
ciao _________________ while True:Gentoo() |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pascalbrax Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/9174105014148257426517.jpg)
Joined: 21 Jan 2004 Posts: 280 Location: 127.0.0.1
|
Posted: Mon Jul 19, 2004 9:23 pm Post subject: |
|
|
si ma come guest avevo mappato samba
e la cartella in share e' proprio sotto /home/samba
cosa ce' che non afferro? ![Smile :)](images/smiles/icon_smile.gif) _________________ "One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
FonderiaDigitale Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/160661570245a62657b3321.jpg)
Joined: 06 Nov 2003 Posts: 1710 Location: Rome, Italy
|
Posted: Tue Jul 20, 2004 6:48 am Post subject: |
|
|
ocio che samba non usa shadow o passwd (ovvero gli account di sistema) per i propri utenti.
devi creare utenti separati per il proprio db (che puo' essere anche mysql, e che con apposite utility puo essere tenuto in sincrono con quello unix solito).
per aggiungere un utente in samba, Code: | smbpasswd -a utente |
_________________ Come disse un amico, i sistemisti sono un po' come gli artigiani per l'informatica
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pascalbrax Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/9174105014148257426517.jpg)
Joined: 21 Jan 2004 Posts: 280 Location: 127.0.0.1
|
Posted: Tue Jul 20, 2004 11:48 am Post subject: |
|
|
si, questo l'avevo fatto, proprio come nell'howto... _________________ "One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
xchris Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/212070142342d3867489e82.jpg)
Joined: 10 Jul 2003 Posts: 2824
|
Posted: Tue Jul 20, 2004 11:53 am Post subject: |
|
|
a questo punto controlla effettivamente il proprietario della directory.
ciao _________________ while True:Gentoo() |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pascalbrax Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/9174105014148257426517.jpg)
Joined: 21 Jan 2004 Posts: 280 Location: 127.0.0.1
|
Posted: Tue Jul 20, 2004 11:55 am Post subject: |
|
|
la cartella /home/samba e /home/samba/pubblic appartengono a...
[rullo di tampuri]
samba!! _________________ "One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
xchris Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/212070142342d3867489e82.jpg)
Joined: 10 Jul 2003 Posts: 2824
|
Posted: Tue Jul 20, 2004 12:00 pm Post subject: |
|
|
risetta i permessi a 755 (in modo ricorsivo sulla dir per essere sicuro)
e prova a mettere security = user in samba.conf
ciao _________________ while True:Gentoo() |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pascalbrax Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/9174105014148257426517.jpg)
Joined: 21 Jan 2004 Posts: 280 Location: 127.0.0.1
|
Posted: Tue Jul 20, 2004 12:08 pm Post subject: |
|
|
gia' testato. usando security = user, su windows mi appare una finestra di login quando tento di accedere allo share... inutile dire che qualsiasi combinazionei di login e password mi da sempre accesso negato. ![Laughing :lol:](images/smiles/icon_lol.gif) _________________ "One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
xchris Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/212070142342d3867489e82.jpg)
Joined: 10 Jul 2003 Posts: 2824
|
Posted: Tue Jul 20, 2004 12:14 pm Post subject: |
|
|
mettendo public = yes?
e' strano.
cmq taglierei la testa al toro abilitando un tuo user unix (ziopippo ad es)
facendo il solito smbpasswd -a ziopippo
e lasciando security=user
e' meglio che lasciarlo pub!
ciao _________________ while True:Gentoo() |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pascalbrax Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/9174105014148257426517.jpg)
Joined: 21 Jan 2004 Posts: 280 Location: 127.0.0.1
|
Posted: Tue Jul 20, 2004 12:16 pm Post subject: |
|
|
beh, per funzionare, funziona.
ho messo i permessi a 777 e tenuto security = share come avevi suggerito tu. ma il mio era piu' che altro una curiosita' didattica ![Smile :)](images/smiles/icon_smile.gif) _________________ "One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
xchris Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/212070142342d3867489e82.jpg)
Joined: 10 Jul 2003 Posts: 2824
|
Posted: Tue Jul 20, 2004 12:24 pm Post subject: |
|
|
si pero' non ti ho mai consigliato security = share
io un 777 non lo terrei sul sistema
prova con altro utente. (non samba)
ciao _________________ while True:Gentoo() |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
FonderiaDigitale Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/160661570245a62657b3321.jpg)
Joined: 06 Nov 2003 Posts: 1710 Location: Rome, Italy
|
Posted: Tue Jul 20, 2004 5:24 pm Post subject: |
|
|
primo, security=share e' il diavolo.
secondo, ogni utente smb deve essere accoppiato a un utente di sistema _________________ Come disse un amico, i sistemisti sono un po' come gli artigiani per l'informatica
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|