[SAMBA] Geen schrijf rechten

Pagina: 1
Acties:

  • G F0rce 1
  • Registratie: Juli 2003
  • Laatst online: 04-03-2015
Hoi iedereen,
Ik heb de search gebruikt en verschilende topics gevonden met mensen met het zelfde probleem onder andere deze maar nergens kan ik de oplossing voor mijn probleem vinden. Ik ben vrij nieuw met Linux dus niet met enge termen gaan gooien zometten hè ;) ! In ieder geval gaat het om het volgende.

Ik heb een Slackware 9.1 bakje draaien met daarop samba. Nu wil ik een share maken die door iedereen maar dan ook echt iedereen benadert kan worden. Iedereen moet daar alle rechten hebben. Nu heb ik het volgende in mijn samba config staan:

code:
1
2
3
4
5
6
7
8
[Webserver]
   comment = htdocs
   path = /var/www
   guest ok = yes
   guest only = yes
   public = yes
   writable = yes
   browsable = yes


Ik kan op alle computer gewoon in de map komen browsen en bestanden openen. Maar op geen enkele manier wijzigen. (Verwijderen / Hernamen / Verplaatsen).
Ik ben nu al drie dagen aan het googlen en ik wordt er een beetje moedeloos van 8)7 . Weet iemand wat het probllem is ? Alvast bedankt

I feel absolutely clean inside, and there is nothing but pure euphoria. - Alexander Shulgin


  • blaataaps
  • Registratie: Juli 2001
  • Niet online
Is de directory wel schrijfbaar voor de user nobody (met chmod of nobody de eigenaar maken), voor zover ik weet de default user waaronder de samba daemon draait?

  • G F0rce 1
  • Registratie: Juli 2003
  • Laatst online: 04-03-2015
Ik heb het volgende gedaan:
chmod 755 /var/www/
en:
chown nobody /var/www/
Dit heeft niet geholpen !

I feel absolutely clean inside, and there is nothing but pure euphoria. - Alexander Shulgin


  • BeachPatroller
  • Registratie: November 2002
  • Laatst online: 24-04-2024

BeachPatroller

Buk en suck

En als je de volgende regel aan je share toevoegd?

bijv.

valid users = nobody

en als je testparm uitvoerd?

Zie je dan dit er ergens tussen staan?
code:
1
2
3
4
5
6
7
8
        read only = Yes
        create mask = 0744
        force create mode = 00
        security mask = 0777
        force security mode = 00
        directory mask = 0755
        force directory mode = 00
        directory security mask = 0777

[ Voor 66% gewijzigd door BeachPatroller op 16-12-2003 18:23 ]

Ik ben malle Pietje niet.


  • Spider.007
  • Registratie: December 2000
  • Niet online

Spider.007

* Tetragrammaton

Wat staat er in je logfiles? en op welke manier (R/W) wordt er volgens smbstatus ingelogd?

---
Prozium - The great nepenthe. Opiate of our masses. Glue of our great society. Salve and salvation, it has delivered us from pathos, from sorrow, the deepest chasms of melancholy and hate


Verwijderd

Moet je niet een geldig linux account toewijzen aa guest:
code:
1
  guest account = nobody

  • Maarten
  • Registratie: Januari 2002
  • Niet online
BeachPatroller schreef op 16 december 2003 @ 18:17:
En als je de volgende regel aan je share toevoegd?

bijv.

valid users = nobody

?
ik neem aan aan het verhaal te horen dat hij als sequrity de share gebruikt :)
is het dan nog steeds nodig / nuttig users aan te geven bij je share :?

  • BeachPatroller
  • Registratie: November 2002
  • Laatst online: 24-04-2024

BeachPatroller

Buk en suck

Amd'er goede vraag,

Ik denk dat als samba op share staat, dan draait de share onder het samba proces, (default als root volgens mij). Misschien dat valid kijkt voorwie de
smbd -D draait (met user als username).

Ik ben malle Pietje niet.


  • G F0rce 1
  • Registratie: Juli 2003
  • Laatst online: 04-03-2015
Spider.007 schreef op 16 december 2003 @ 18:20:
Wat staat er in je logfiles? en op welke manier (R/W) wordt er volgens smbstatus ingelogd?
In de log staat het volgende :

code:
1
2
3
4
5
6
7
8
9
10
[2003/12/16 16:33:46, 0] nmbd/nmbd_become_lmb.c:become_local_master_stage2(396)
  *****

  Samba name server MERLIN is now a local master browser for workgroup WORKGROUP on subnet 192.168.1.10
3

  *****
[2003/12/16 16:42:56, 0] nmbd/nmbd_incomingrequests.c:process_name_release_request(118)
  process_name_release_request: Attempt to release name WORKGROUP<1d> from IP 192.168.1.100 on subnet 1
92.168.1.103 being rejected as it is one of our names.


Al het bovenstaande heb ik verder geprobeerd maar dat heeft niet gebaat.
Hier mijn totale config.

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
#======================= Global Settings =====================================
[global]

# workgroup = NT-Domain-Name or Workgroup-Name, eg: LINUX2
   workgroup = WORKGROUP

# server string is the equivalent of the NT Description field
   server string = Merlin

# Security mode. Defines in which mode Samba will operate. Possible
# values are share, user, server, domain and ads. Most people will want
# user level security. See the HOWTO Collection for details.
   security = share

# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
   hosts allow = 192.168.1. 192.168.2. 127.

# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
   load printers = yes

# you may wish to override the location of the printcap file
;   printcap name = /etc/printcap
# on SystemV system setting printcap name to lpstat should allow
# you to automatically obtain a printer list from the SystemV spool
# system
;   printcap name = lpstat

# It should not be necessary to specify the print system type unless
# it is non-standard. Currently supported print systems include:
# bsd, cups, sysv, plp, lprng, aix, hpux, qnx
;   printing = cups

# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
#  guest account = pcguest

# this tells Samba to use a separate log file for each machine
# that connects
   log file = /var/log/samba.%m

# Put a capping on the size of the log files (in Kb).
   max log size = 50

# Use password server option only with security = server
# The argument list may include:
#   password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
# or to auto-locate the domain controller/s
#   password server = *
;   password server = <NT-Server-Name>

# Use the realm option only with security = ads
# Specifies the Active Directory realm the host is part of
;   realm = MY_REALM
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
;   passdb backend = tdbsam

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting.
# Note: Consider carefully the location in the configuration file of
#       this line.  The included file is read at that point.
;   include = /usr/local/samba/lib/smb.conf.%m

# Most people will find that this option gives better performance.
# See the chapter 'Samba performance issues' in the Samba HOWTO Collection
# and the manual pages for details.
# You may want to add the following on a Linux system:
#         SO_RCVBUF=8192 SO_SNDBUF=8192
   socket options = TCP_NODELAY

# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# here. See the man page for details.
;   interfaces = 192.168.12.2/24 192.168.13.2/24

# Browser Control Options:
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
;   local master = no

# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
;   os level = 33

# Domain Master specifies Samba to be the Domain Master Browser. This
# allows Samba to collate browse lists between subnets. Don't use this
# if you already have a Windows NT domain controller doing this job
;   domain master = yes

# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
;   preferred master = yes

# Enable this if you want Samba to be a domain logon server for
# Windows95 workstations.
;   domain logons = yes

# if you enable domain logons then you may want a per-machine or
# per user logon script
# run a specific logon batch file per workstation (machine)
;   logon script = %m.bat
# run a specific logon batch file per username
;   logon script = %U.bat

# Where to store roving profiles (only for Win95 and WinNT)
#        %L substitutes for this servers netbios name, %U is username
#        You must uncomment the [Profiles] share below
;   logon path = \\%L\Profiles\%U

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
;   wins support = yes
# WINS Server - Tells the NMBD components of Samba to be a WINS Client
#       Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
;   wins server = w.x.y.z

# WINS Proxy - Tells Samba to answer name resolution queries on
# behalf of a non WINS capable client, for this to work there must be
# at least one  WINS Server on the network. The default is NO.
;   wins proxy = yes

# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The default is NO.
   dns proxy = no

# These scripts are used on a domain controller or stand-alone
# machine to add or delete corresponding unix accounts
;  add user script = /usr/sbin/useradd %u
;  add group script = /usr/sbin/groupadd %g
;  add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
;  delete user script = /usr/sbin/userdle %u
;  delete user from group script = /usr/sbin/deluser %u %g
;  delete group script = /usr/sbin/groupdel %g


#============================ Share Definitions ==============================
[homes]
   comment = Home Directories
   browseable = no
   writable = yes

# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
;   comment = Network Logon Service
;   path = /usr/local/samba/lib/netlogon
;   guest ok = yes
;   writable = no
;   share modes = no


# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;[Profiles]
;    path = /usr/local/samba/profiles
;    browseable = no
;    guest ok = yes


# NOTE: If you have a BSD-style print system there is no need to
# specifically define each individual printer
#[printers]
#   comment = All Printers
#   path = /var/spool/samba
#   browseable = no
# Set public = yes to allow user 'guest account' to print
#   guest ok = no
#   writable = no
#   printable = yes
# This one is useful for people to share files
[Webserver]
   comment = htdocs
   guest account = nobody
   path = /var/www
   guest ok = yes
   guest only = yes
   public = yes
   writable = yes
   browsable = yes



# A publicly accessible directory, but read only, except for people in
# the "staff" group
;[public]
;   comment = Public Stuff
;   path = /home/samba
;   public = yes
;   writable = yes
;   printable = no
;   write list = @staff

# Other examples.
#
# A private printer, usable only by fred. Spool data will be placed in fred's
# home directory. Note that fred must have write access to the spool directory,
# wherever it is.
;[fredsprn]
;   comment = Fred's Printer
;   printer = freds_printer
;   public = no
;   writable = no
;   printable = yes

# A private directory, usable only by fred. Note that fred requires write
# access to the directory.
;[fredsdir]
;   comment = Fred's Service
;   path = /usr/somewhere/private
;   valid users = fred
;   public = no
;   writable = yes
;   printable = no

# a service which has a different directory for each machine that connects
# this allows you to tailor configurations to incoming machines. You could
# also use the %U option to tailor it by user name.
# The %m gets replaced with the machine name that is connecting.
;[pchome]
;  comment = PC Directories
;  path = /usr/pc/%m
;  public = no
;  writable = yes

# A publicly accessible directory, read/write to all users. Note that all files
# created in the directory by users will be owned by the default user, so
# any user with access can delete any other user's files. Obviously this
# directory must be writable by the default user. Another user could of course
# directory must be writable by the default user. Another user could of course
# be specified, in which case all files would be owned by that user instead.
;[public]
;   path = /usr/somewhere/else/public
;   public = yes
;   only guest = yes
;   writable = yes
;   printable = no

# The following two entries demonstrate how to share a directory so that two
# users can place files there that will be owned by the specific users. In this
# setup, the directory should be writable by both users and should have the
# sticky bit set on it to prevent abuse. Obviously this could be extended to
# as many users as required.
;[myshare]
;   comment = Mary's and Fred's stuff
;   path = /usr/somewhere/shared
;   valid users = mary fred
;   public = no
;   writable = yes
;   printable = no
;   create mask = 0765

[ Voor 86% gewijzigd door G F0rce 1 op 16-12-2003 18:44 ]

I feel absolutely clean inside, and there is nothing but pure euphoria. - Alexander Shulgin


  • BeachPatroller
  • Registratie: November 2002
  • Laatst online: 24-04-2024

BeachPatroller

Buk en suck

misschien beetje rare vraag,

Heb je het workgroup verhaal goed ingevuld?
In Windows zelfde als op linuxbak.

Verder domain logons? Gebruik je een domaincontroller?

Verder zou ik je interface alleen binnen je lan openzetten,

browsemaster op yes
OS level 255 zodat je zeker weet dat hij wint

Je moet hier en daar de nodige ; weghalen


Je moet deze in hoofdletters invullen, windows verstuurd de gehele werkgroepnaam in hoofdletters.

Dit is wat er zou moeten staan

Dec 16 00:12:00 pat nmbd[11603]: Samba name server REDHATDOOS is now a local master browser for workgroup DVIC on subnet 192.168.0.1

DVIC is een voorbeeld werkgroepnaam.


Welke windowsclients gebruik je?


dan moet je even een grep doen op election.

SAMBA FOR PRESIDENT!

Mijn buurjongen loopt bijv. wel eens te klooien en dan zi e ik dit voorbijkomen.

Dec 16 00:11:43 pat nmbd[11603]: process_local_master_announce: Server ATHLON1800 at IP 192.168.0.88 is announcing itself as a local master browser for workgroup DVIC and we think we are master. Forcing election.


Met alle respect denk ik dat je toch wat beter naar je configuratie moet kijken en bestuderen of je het er ECHT wel mee eens bent. Volgens mij ben je nieuw met Samba.

Maar goed.

[ Voor 38% gewijzigd door BeachPatroller op 16-12-2003 18:56 ]

Ik ben malle Pietje niet.


  • Kapoen
  • Registratie: Mei 2002
  • Laatst online: 06:00
Ik weet niet of het helpt, maar ik heb een soortgelijke configuratie (publieke file server zonder logins) draaien op mijn Slack 9.0 bakje (Samba versie 2.2.8 geloof ik). Dit is mijn config file:
[global]
workgroup = WORKGROUP ;zelfde werkgroep als je windows pc
netbios name = linux
hosts allow = 192.168.0. ;192.168.0.x is de ip-range van mijn thuisnetwerkje
security = share
encrypt passwords = yes
wins support = yes

[public]
path = /public/open
guest ok = yes
public = yes
browseable = yes
writeable = yes
Vervolgens heb ik de directory /public/open 'gechmod' naar 777.
In windows mount ik de server dan via \\linux\public

Deze configuratie is natuurlijk vrij onveilig, maar binnen een thuis-intranet deert dat niet echt :)

[ Voor 12% gewijzigd door Kapoen op 17-12-2003 07:10 ]

Clowns to the left of me, Jokers to the right


Verwijderd

okeej verander het volgende: 192.168.1. laat je staan alsje een 2e netwerk range hebt hebje 192.168.2. nodig maargoe ik denk van nie.
wijzig socket options in: TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

voeg dit toe aan je webserver config: force user = root
create mask = 0666
delete guest only....

==> browseable = yes
writeable = yes

moeten er ook bij als het niet werkt....

en delete de vb crap dingetjes scheelt een lange config post ;)

zou moeten werken denk zo....

[ Voor 15% gewijzigd door Verwijderd op 16-12-2003 18:56 ]


  • Spider.007
  • Registratie: December 2000
  • Niet online

Spider.007

* Tetragrammaton

Verwijderd schreef op 16 december 2003 @ 18:53:
okeej verander het volgende: 192.168.1. laat je staan alsje een 2e netwerk range hebt hebje 192.168.2. nodig maargoe ik denk van nie.
wijzig socket options in: TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

voeg dit toe aan je webserver config: force user = root create mask = 0666

==> browseable = yes
writeable = yes

moeten er ook bij als het niet werkt....

en delete de vb crap dingetjes scheelt een lange config post ;)

zou moeten werken denk zo....
Voor TS => vb = voorbeeld is elke regel waar een ; of # voorstaat :)

---
Prozium - The great nepenthe. Opiate of our masses. Glue of our great society. Salve and salvation, it has delivered us from pathos, from sorrow, the deepest chasms of melancholy and hate


  • G F0rce 1
  • Registratie: Juli 2003
  • Laatst online: 04-03-2015
Het werkt nu het was inderdaad een probleem met de owner van de mappen. Deze heb ik nu maar veranderd naar Nobody. Beetje brak voor de beveiliging maar in iedergeval werkt het nu.

I feel absolutely clean inside, and there is nothing but pure euphoria. - Alexander Shulgin


  • Wilke
  • Registratie: December 2000
  • Laatst online: 23-02 22:21
Verwijderd schreef op 16 december 2003 @ 18:53:
voeg dit toe aan je webserver config: force user = root
Dit zou vanuit beveiligingsstandpunt gezien een ultiem domme actie zijn, en dat zou ik dan ook zeker niet zo doen.

Je andere opmerking raakt al helemaal kant nog wal en is om die reden getrashed. Als je denkt dat je meer van Linux weet dan TS, probeer dan niet dit soort adviezen te geven - en opmerkingen plaatsen die niks doen behalve posts van anderen (in feite) afzeiken is natuurlijk sowieso ongewenst.
Pagina: 1