Access Denied / Operation Not Permitted Error

Brian P Kasper Brian.P.Kasper at aero.org
Tue Dec 4 11:51:07 GMT 2001


Hello.

I am having problems copying files from a WinNT 4.0 box
to a Red Hat Linux 7.0 computer running Samba 2.2.2 (I've
seen this problem with 2.2.1a also).  I downloaded 2.2.2
from samba.org and built/installed it myself.

I've checked the FAQ at samba.org and searched the
mailing list archives at marc.theaimsgroup.com; I've
also done several Google searches.  I've seen a couple
of mentions of the problem in different mailing lists,
but I've seen no answers with solutions.

If I drag-and-drop a file in Windows Explorer from a
directory on the NT box to a share on the Linux box,
I intermittantly receive the error message "Cannot
copy [file]:  Access is denied."

If I check the Samba logfile (log level 4), I see this:

[2001/12/04 04:58:29, 4] smbd/open.c:open_file_shared(784)
  calling open_file with flags=0x1 flags2=0x240 mode=0764
[2001/12/04 04:58:29, 2] smbd/open.c:open_file(214)
  kasper opened file tmp/schiff16.bin read=No write=Yes (numopen=2)
[2001/12/04 04:58:29, 2] smbd/close.c:close_normal_file(206)
  kasper closed file tmp/schiff16.bin (numopen=1)
[2001/12/04 04:58:29, 3] smbd/error.c:error_packet(99)
  error string = Operation not permitted
[2001/12/04 04:58:29, 3] smbd/error.c:error_packet(111)
  error packet at smbd/nttrans.c(1405) cmd=160 (SMBnttrans) eclass=1
ecode=12

I end up with a zero-length file named "schiff16.bin" in
the destination directory.  The basic problem seems to be
that the file is opened for writing and immediately closed,
resulting in the zero-length file.

This is an intermittant problem which seems to become worse
with larger files.  I'm wondering if it's a timeout problem;
it doesn't *appear* to be a permission problem, because it
doesn't always happen.  Looking in the source (open.c, around
line 791), I see this comment:

* Deal with the race condition where two smbd's detect the file doesn't
* exist and do the create at the same time[ etc ...]

Is it possible that this race condition hasn't been fully debugged?

I've attached the contents of my smb.conf file.  I'm trying to write
the file to a subdirectory in the main "yoyodyne" share.

[global]
   workgroup = std
   netbios name = yoyodyne
   server string = Samba Server
   log file = /var/log/samba/%I.log
   log level = 4
   max log size = 1000
   security = user
   encrypt passwords = yes
   smb passwd file = /etc/samba/smbpasswd
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   interfaces = [snipped]/32
   hosts allow = [snipped]
   name resolve order = host
   wins support = yes
   wins proxy = yes
   preserve case = yes
   short preserve case = yes
   default case = lower
   case sensitive = yes

[homes]
   comment = Home Directories
   browseable = no
   writable = yes

[yoyodyne]
  comment = Standard yoyodyne share
  path = /
  public = yes
  writeable = yes
  read only = no

Thanks in advance for your time and consideration.

-Brian Kasper
 kasper at aero.org






More information about the samba mailing list