LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   cant create or copy files to samba share (http://www.linuxquestions.org/questions/linux-server-73/cant-create-or-copy-files-to-samba-share-653053/)

Elnegro8 07-02-2008 08:14 AM

cant create or copy files to samba share
 
hi all i use centos 5 and i cant copy files or create folder in the samba share throw window

here some info about my files&logs :

smb.conf :
[global]
workgroup = WORKGROUP
server string = Samba Server
encrypt passwords = True
security = user
smb passwd file = /etc/smbpasswd
log file = /var/log/samba/log.%m
socket options = IPTOS_LOWDELAY TCP_NODELAY
smb passwd file =/etc/smbpasswd
dns proxy = No
hosts deny = ALL
hosts allow = 192.168.2.0/24 127.0.0.1
debug level = 2
create mask = 0644
directory mask = 0755
level2 oplocks = True
read raw = no
write cache size = 262144





[FileServer]
comment = FileServer
path = /mnt/storage/
read only = no
writable = yes
public = yes

#############################################

smbpasswd :

[root@Elena ~]# cat /etc/smbpasswd
samba:500:DF7D4C80BE72A070AAD3B435B51404EE:B3A3496D3F61D8CDA3B865A2B4B29A37:[U ]:LCT-486B709E:
test:501:01FC5A6BE7BC6929AAD3B435B51404EE:0CB6948805F797BF2A82807973B89537:[U ]:LCT-486B75E3:


i log on to the share from windows xp with samba user

but i can do nothing i gave full permission to the folder share /mnt/storage

the samba log is


Allowed connection from (192.168.2.10)
[2008/07/02 15:53:59, 1] smbd/service.c:make_connection_snum(1033)
win-tzahi (192.168.2.10) connect to service FileServer initially as user samba (uid=500, gid=500) (pid 5480)
[2008/07/02 15:53:59, 2] smbd/open.c:open_directory(2092)
open_directory: unable to create .. Error was NT_STATUS_OBJECT_NAME_COLLISION
[2008/07/02 15:53:59, 2] smbd/open.c:open_directory(2092)
open_directory: unable to create Grand Theft Auto IV MULTI5 PAL READNFO XBOX360. Error was NT_STATUS_ACCESS_DENIED
[2008/07/02 15:53:59, 2] smbd/open.c:open_directory(2092)
open_directory: unable to create Grand Theft Auto IV MULTI5 PAL READNFO XBOX360. Error was NT_STATUS_ACCESS_DENIED
[2008/07/02 15:54:10, 1] smbd/service.c:close_cnum(1230)
win-tzahi (192.168.2.10) closed connection to service FileServer
[2008/07/02 15:56:10, 2] smbd/process.c:timeout_processing(1363)
Closing idle connection
[2008/07/02 15:57:17, 2] auth/auth.c:check_ntlm_password(309)
check_ntlm_password: authentication for user [samba] -> [samba] -> [samba] succeeded
[2008/07/02 15:57:17, 2] lib/access.c:check_access(323)
Allowed connection from (192.168.2.10)
[2008/07/02 15:57:17, 1] smbd/service.c:make_connection_snum(1033)
win-tzahi (192.168.2.10) connect to service FileServer initially as user samba (uid=500, gid=500) (pid 5489)
[2008/07/02 15:57:23, 2] smbd/open.c:open_directory(2092)
open_directory: unable to create New Folder. Error was NT_STATUS_ACCESS_DENIED
[2008/07/02 15:57:23, 2] smbd/open.c:open_directory(2092)
open_directory: unable to create .. Error was NT_STATUS_OBJECT_NAME_COLLISION
[2008/07/02 15:57:23, 2] smbd/open.c:open_directory(2092)
open_directory: unable to create New Folder. Error was NT_STATUS_ACCESS_DENIED
[2008/07/02 15:57:23, 2] smbd/open.c:open_directory(2092)
open_directory: unable to create New Folder (2). Error was NT_STATUS_ACCESS_DENIED
[2008/07/02 15:57:23, 2] smbd/open.c:open_directory(2092)
open_directory: unable to create .. Error was NT_STATUS_OBJECT_NAME_COLLISION
[2008/07/02 15:57:23, 2] smbd/open.c:open_directory(2092)
open_directory: unable to create New Folder (2). Error was NT_STATUS_ACCESS_DENIED



please advise drhappy (-:

w3bd3vil 07-02-2008 08:40 AM

First thing, you could remove
hosts deny = ALL
hosts allow will allow the ips specified and block others by default

try adding
browseable = yes
to your share and check.

Elnegro8 07-02-2008 09:31 AM

i did and stil nothibg logs:

[2008/07/02 17:24:51, 2] auth/auth.c:check_ntlm_password(309)
check_ntlm_password: authentication for user [samba] -> [samba] -> [samba] succeeded
[2008/07/02 17:24:51, 2] lib/access.c:check_access(323)
Allowed connection from (192.168.2.10)
[2008/07/02 17:24:51, 1] smbd/service.c:make_connection_snum(1033)
win-tzahi (192.168.2.10) connect to service FileServer initially as user samba (uid=500, gid=500) (pid 5784)
[2008/07/02 17:24:54, 2] lib/access.c:check_access(323)
Allowed connection from (192.168.2.10)
[2008/07/02 17:24:58, 2] smbd/open.c:open_directory(2092)
open_directory: unable to create New Folder. Error was NT_STATUS_ACCESS_DENIED
[2008/07/02 17:24:58, 2] smbd/open.c:open_directory(2092)
open_directory: unable to create .. Error was NT_STATUS_OBJECT_NAME_COLLISION
[2008/07/02 17:24:58, 2] smbd/open.c:open_directory(2092)
open_directory: unable to create New Folder. Error was NT_STATUS_ACCESS_DENIED
[2008/07/02 17:24:58, 2] smbd/open.c:open_directory(2092)
open_directory: unable to create New Folder (2). Error was NT_STATUS_ACCESS_DENIED
[2008/07/02 17:24:58, 2] smbd/open.c:open_directory(2092)
open_directory: unable to create .. Error was NT_STATUS_OBJECT_NAME_COLLISION
[2008/07/02 17:24:58, 2] smbd/open.c:open_directory(2092)
open_directory: unable to create New Folder (2). Error was NT_STATUS_ACCESS_DENIED


smb.conf


[global]
workgroup = WORKGROUP
server string = Samba Server
encrypt passwords = True
security = user
smb passwd file = /etc/smbpasswd
log file = /var/log/samba/log.%m
socket options = IPTOS_LOWDELAY TCP_NODELAY
; domain master = Yes
smb passwd file =/etc/smbpasswd
; local master = Yes
; preferred master = Yes
; os level = 65
dns proxy = No
; name resolve order = lmhosts host bcast
; bind interfaces only = True
; interfaces = eth0 192.168.2.1
hosts allow = 192.168.2.0/24 127.0.0.1
debug level = 2
create mask = 0644
directory mask = 0755
level2 oplocks = True
read raw = no
write cache size = 262144

;[homes]
;comment = Home Directories
;read only = no
;writable = yes

;[tmp]
;comment = Temporary File Space
;path = /tmp
;read only = No
;writable = yes

;[tzahia]
;comment = tzahia linux
;path = /mnt/tzahia/
;read only = no
;writable = yes


[FileServer]
comment = FileServer
path = /mnt/storage/
read only = no
writable = yes
public = yes
browseable = yes


chmod

[root@Elena samba]# ll -l /mnt/
total 8
drwxrwxrwx 2 root root 4096 Jul 1 16:26 storage
[root@Elena samba]#


please help cant create or copy

w3bd3vil 07-02-2008 11:09 AM

Last thing I could think of.
create a share named /test123
make it world writeable and then try.
i.e change /mnt/storage to /test123
or make /mnt chmod 777 and give it a try

and remove writable = yes, because read only = no and writeable = yes mean the same thing.

marozsas 07-02-2008 01:28 PM

What is the mount command you are using ?
To mount you need to be root, right ? On the mount command you need to specify who is the linux user that can hve access to the share. On the command below the linux user "miguel" has uid/gid=500:
Code:

[root@babylon5 ~]# mount -t cifs //server/temp /mnt -o user=miguel,password=miguels_pasword_on_samba,uid=500,gid=500
[root@babylon5 ~]#

and as "miguel"...
Code:

[miguel@babylon5 ~]$ touch /mnt/test
[miguel@babylon5 ~]$ ll /mnt/test
-rw-rw-r-- 1 miguel miguel 0 2008-07-02 14:25 /mnt/test
[miguel@babylon5 ~]$ rm /mnt/test
[miguel@babylon5 ~]$


Elnegro8 07-03-2008 05:32 AM

i didnt understand in order to make samba work with win-xp i thgoht i need only to install samba to edit the smb.conf with a share and to create a user in the etc/passwd and to create password to samba with the smbpasswd - auser name
am i right >?? please advise i need also to mount the share folder??

as so here is my files on my samba please take a look and tell me where i gone worng

smb.conf :
[global]
workgroup = WORKGROUP
server string = Samba Server
encrypt passwords = True
security = user
smb passwd file = /etc/samba/smbpasswd
log file = /var/log/samba/log.%m
socket options = IPTOS_LOWDELAY TCP_NODELAY
smb passwd file =/etc/smbpasswd
dns proxy = No
hosts allow = 192.168.2.0/24 127.0.0.1
debug level = 2
create mask = 0644
directory mask = 0755
level2 oplocks = True
read raw = no
write cache size = 262144




[FileServer]
comment = FileServer
path = /mnt/storage/
read only = no
public = no

the user in the
etc/passwd that im use to enter the samba also exist in the smbpasswd -a tzahia

tzahi:x:500:500::/home/tzahi:/bin/bash

do i need also to add manually the user tzahi to :

[root@Elena ~]# cat /etc/samba/smbusers
# Unix_name = SMB_name1 SMB_name2 ...
root = administrator admin
nobody = guest pcguest smbguest


and do i need to mount the /mnt/storage ?????

if so please tell me how due all the folwing that i send

10xxx alot


tzahi

marozsas 07-03-2008 07:46 AM

I am sorry, I understand wrong. Rreading your post again, looks like you can't create files on winXP side, right ?

I suppose you can, at least, to mount the share "FileServer" on windows XP side and see the files and folders on it, right ?

try to add the explicit permissions to the user "samba" to FileServer share definition:
Code:

[FileServer]
comment = FileServer
path = /mnt/storage/
read only = no
writable = yes
public = yes
browseable = yes
valid users = samba
write list = samba

and add explict permissions to the user "samba" to folder /mnt/storage. You can do that either by changing of the owner of the folder /mnt/storage (chown samba /mnt/storage) or by changing the access mode of the folder for anyone (chmod o+rwx /mnt/storage)

restart the samba server and try to create files/folders on the share on a winXP host.

Elnegro8 07-03-2008 09:38 AM

hi im sorry if i drove you carsy but for some reason i cant log in to the samba shre from wi-xp i stuck in the user+password screen (xp)

the log
[2008/07/03 17:31:44, 0] passdb/pdb_smbpasswd.c:startsmbfilepwent(325)
startsmbfilepwent_internal: failed to set 0600 permissions on password file /etc/smbpasswd. Error was Permission denied
.Unable to open passdb database.
[2008/07/03 17:31:44, 2] auth/auth.c:check_ntlm_password(319)
check_ntlm_password: Authentication for user [samba] -> [samba] FAILED with error NT_STATUS_NO_SUCH_USER

sound familiar ?

10xx alot so far for your help

marozsas 07-03-2008 10:26 AM

The error message in the log says something about wrong permissions of /etc/smbpasswd.
What is the current permissions of this file ? (ls -l /etc/smbpasswd)

Elnegro8 07-07-2008 05:02 AM

hi i reinstall the server and now i success to login with samba user but i cant create or copy to the samba share please take a look

smb.conf

#======================= Global Settings =====================================

[global]
workgroup = WORKGROUP
server string = Samba Server Version %v
hosts allow = 192.168.2.10 127.0.0.1
security = user
passdb backend = tdbsam
load printers = yes
cups options = raw
debug level = 2
smb passwd file = /etc/smbpasswd
encrypt passwords = True
log file = /var/log/samba/log.%m


#============================ Share Definitions ==============================


[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = no
writable = no
printable = yes

[FileServer]
comment = FileServer
path = /mnt/FileServer
read only = no
writable = yes
public = yes
browseable = yes

samba log file :

[2008/07/07 11:56:13, 2] auth/auth.c:check_ntlm_password(309)
check_ntlm_password: authentication for user [samba] -> [samba] -> [samba] succeeded
[2008/07/07 11:56:13, 2] lib/access.c:check_access(323)
Allowed connection from (192.168.2.10)
[2008/07/07 11:56:18, 2] lib/access.c:check_access(323)
Allowed connection from (192.168.2.10)
[2008/07/07 11:56:18, 2] lib/access.c:check_access(323)
Allowed connection from (192.168.2.10)
[2008/07/07 11:56:18, 1] smbd/service.c:make_connection_snum(1033)
win-tzahi (192.168.2.10) connect to service FileServer initially as user samba (uid=500, gid=500) (pid 4465)
[2008/07/07 11:56:25, 2] smbd/open.c:open_directory(2092)
open_directory: unable to create New Folder. Error was NT_STATUS_ACCESS_DENIED
[2008/07/07 11:56:25, 2] smbd/open.c:open_directory(2092)
open_directory: unable to create .. Error was NT_STATUS_OBJECT_NAME_COLLISION
[2008/07/07 11:56:25, 2] smbd/open.c:open_directory(2092)
open_directory: unable to create New Folder. Error was NT_STATUS_ACCESS_DENIED
[2008/07/07 11:56:25, 2] smbd/open.c:open_directory(2092)
open_directory: unable to create New Folder (2). Error was NT_STATUS_ACCESS_DENIED
[2008/07/07 11:56:25, 2] smbd/open.c:open_directory(2092)
open_directory: unable to create .. Error was NT_STATUS_OBJECT_NAME_COLLISION
[2008/07/07 11:56:25, 2] smbd/open.c:open_directory(2092)
open_directory: unable to create New Folder (2). Error was NT_STATUS_ACCESS_DENIED


[root@Elena home]# ls -l /mnt/
total 8
drwxrwxrwx 2 root root 4096 Jul 7 11:42 FileServer


10XXX

marozsas 07-07-2008 06:55 AM

try to explict permit a user to have write access to the share as I suggested in a previous post in this thread.

Elnegro8 07-07-2008 07:28 AM

i did

drwxrwxrwx 2 samba root 4096 Jul 7 11:42 FileServer
[root@Elena /]# less /var/log/samba/log.win-tzahi


but still :

[FileServer]
comment = FileServer
path = /mnt/FileServer
read only = no
writable = yes
public = yes
browseable = yes
valid users = samba
write list = samba



open_directory: unable to create New Folder. Error was NT_STATUS_ACCESS_DENIED
[2008/07/07 14:23:25, 2] smbd/open.c:open_directory(2092)
open_directory: unable to create .. Error was NT_STATUS_OBJECT_NAME_COLLISION
[2008/07/07 14:23:25, 2] smbd/open.c:open_directory(2092)
open_directory: unable to create New Folder. Error was NT_STATUS_ACCESS_DENIED
[2008/07/07 14:23:25, 2] smbd/open.c:open_directory(2092)
open_directory: unable to create New Folder (2). Error was NT_STATUS_ACCESS_DENIED
[2008/07/07 14:23:25, 2] smbd/open.c:open_directory(2092)
open_directory: unable to create .. Error was NT_STATUS_OBJECT_NAME_COLLISION
[2008/07/07 14:23:25, 2] smbd/open.c:open_directory(2092)
open_directory: unable to create New Folder (2). Error was NT_STATUS_ACCESS_DENIED
(END)


what is the collison in the log ??????


any other option ? it seems like the folder as been created but i cant see it becuse in the log is shown folder2

what i need to do help

marozsas 07-07-2008 07:55 AM

From a linux machine, (could be from the samba server) try, as regular user:
Code:

$ touch empty.txt
$ smbclient //ip-of-smb-server/FileServer samba-user-password  -W WORKGROUP -u samba
smb: \> ls
...(output of ls command)
smb: \> mkdir test
smb: \> put empty.txt
smb: \> cd test
smb: \> put empty.txt
smb: \> quit
$ rm empty.txt


Elnegro8 07-07-2008 08:51 AM

i think i know what is the problem but no what is the solution :
[root@Elena /]# smbstatus
Processing section "[printers]"
Processing section "[FileServer]"

Samba version 3.0.28-1.el5_2.1
PID Username Group Machine
-------------------------------------------------------------------
5397 test test win-tzahi (192.168.2.10)

Service pid machine Connected at
-------------------------------------------------------
IPC$ 5397 win-tzahi Mon Jul 7 15:44:27 2008
FileServer 5397 win-tzahi Mon Jul 7 15:44:34 2008

Locked files:
Pid Uid DenyMode Access R/W Oplock SharePath Name Time
--------------------------------------------------------------------------------------------------
5397 501 DENY_NONE 0x100001 RDONLY NONE /mnt/FileServer . Mon Jul 7 15:44:34 2008


its seems like the user log in but only to read only R/W how to change this although in the smb.conf its mark to :


[FileServer]
comment = FileServer
path = /mnt/FileServer
read only = no
writable = yes
public = yes
browseable = yes

marozsas 07-07-2008 09:01 AM

Elena, please, give explicit access to FileServer share as I told you, restart the smbd service and give me the results of the smbclient commands in my last post.

With the default parameters in FileServer share is not possible to test what is wrong.


All times are GMT -5. The time now is 01:50 AM.