file locking

Robin P. Blanchard Robin_Blanchard at gactr.uga.edu
Fri Mar 16 16:53:23 GMT 2001


Hey Don -

Thanks for the reply...
Here goes with my attempt at recreating your test:

on win2k client:
create z:\Pop\U2\test.txt

on samba-server:
database 1# ls -ald /export/fs2/mp3/Pop/U2/test.txt 
-rw-rw-r--    1 service  noc            4 Mar 16 10:41
/export/fs2/mp3/Pop/U2/test.txt

file permissions are correct.

now, test the locking problem:
right-click on test.txt on win2k, then check smbstatus:

database 3# /usr/samba/bin/smbstatus

Samba version 2.0.7
Service      uid      gid      pid     machine
----------------------------------------------
MP3          service  noc      31988   robin    (10.10.100.126) Thu Mar 15
11:09:23 2001

No locked files


so, seems you're right. one more test:

database 6# cp -a U2-Always.mp3 U2-Always.txt

right-click on each, and check smbstatus:

(U2-Always.mp3)
Samba version 2.0.7
Service      uid      gid      pid     machine
----------------------------------------------
MP3          service  noc      31988   robin    (10.10.100.126) Thu Mar 15
11:09:23 2001

Locked files:
Pid    DenyMode   R/W        Oplock           Name
--------------------------------------------------
31988  DENY_WRITE RDONLY     EXCLUSIVE+BATCH 
/export/fs2/mp3/Pop/U2/U2-Always.mp3   Fri Mar 16 10:52:00 2001

annoying as suspected.

(U2-Always.txt)
Samba version 2.0.7
Service      uid      gid      pid     machine
----------------------------------------------
MP3          service  noc      31988   robin    (10.10.100.126) Thu Mar 15
11:09:23 2001

Locked files:
Pid    DenyMode   R/W        Oplock           Name
--------------------------------------------------
31988  DENY_WRITE RDONLY     EXCLUSIVE+BATCH 
/export/fs2/mp3/Pop/U2/U2-Always.mp3   Fri Mar 16 10:52:00 2001


So, yes, it seems you've nailed this one. Changing an mp3 file to a txt file
causes it to no longer get locked, thus allowing operation on that file (in
particular, I am able to rename/move that file).
I am, however, still unable to rename/move mp3 files; why you seem to
be able to do so is mysterious.
I would tend to agree with you that this stems from win2k giving the option
to play those files. It would seem then that the answer would be to prevent
windows from 'queueing-up' audio files. You wouldn't happen to know how
to accomplish that would you? :)

Thanks and all further input is greatly appreciated.



> Don't know WHY this is happening, but it appears to have to do with the mp3
> file type; I can duplicate this if I create a simple .txt file, and rename
> it
> to something.mp3; when it's a .txt file, right clicking does NOT lock it,
> but as soon as I rename it to .mp3, then I get the behavior you describe.
> I suspect this is because of the additional options you see that Microsoft
> is presenting because its an mp3 file (like 'play', etc.).
> However, I AM able to rename it without any problem; try something for me;
> go into that same directory where the .mp3 file is, and create a .txt file;
> now check you unix permissions - is the ownership and group and permissions
> what you expect?  I am wondering if your unix umask may be interfering with
> the way the files are getting created/moved.  you might need FORCE create
> mode
> instead of just create mode...
> Hope this helps,
> Don
> 
> -----Original Message-----
> From: Robin P. Blanchard [mailto:Robin_Blanchard at gactr.uga.edu]
> Sent: Thursday, March 15, 2001 12:00 PM
> To: samba at lists.samba.org
> Subject: file locking
> 
> i have having the most annoying file locking problems given the following
> setup:
> 
> server: IRIX 6.5.11 + samba-2.0.7 irix binary (from samba website)
> client: win2k
> 
> when on the client, simply right-clicking on the file causes samba to lock
> it, thus making it impossible to rename/move that file. all file permissions
> seem correct.
> 
> reset directory/file permissions to be sure this is accurate:
> 
> find /export/fs2/mp3 -type f -exec chmod 664 {} \;
> find /export/fs2/mp3 -type d -exec chmod 2775 {} \;
> 
> database 22# pwd
> /export/fs2/mp3/Pop/U2
> database 23# ls -ald .
> drwxrwsr-x    5 service  noc         4096 Mar 12 13:25 .
> database 24# ls -ald U2-Summer.Rain.mp3
> -rw-rw-r--    1 service  noc       5962315 Oct 13 09:02 U2-Summer.Rain.mp3
> 
> looks great so start up samba:
> 
> database 25# /etc/init.d/samba start
> 
> see what smbstatus has to say:
> 
> database 26# /usr/samba/bin/smbstatus
> 
> Samba version 2.0.7
> Service      uid      gid      pid     machine
> ----------------------------------------------
> 
> No locked files
> 
> go over to win2k and right click on a file and check smbstatus again:
> 
> database 27# /usr/samba/bin/smbstatus
> 
> Samba version 2.0.7
> Service      uid      gid      pid     machine
> ----------------------------------------------
> MP3          service  noc      31988   robin    (10.10.100.126) Thu Mar 15
> 11:09:23 2001
> 
> Locked files:
> Pid    DenyMode   R/W        Oplock           Name
> --------------------------------------------------
> 31988  DENY_WRITE RDONLY     EXCLUSIVE+BATCH
> /export/fs2/mp3/Pop/U2/U2-Always.mp3   Thu Mar 15 11:09:31 2001
> 
> so just for kicks see if we can rename that file in win2k:
> 
> "cannot rename U2-Always: access is denied. make sure that
> the disk is not full or write-protected and that the file
> is not currently in use"
> 
> i've been staring at this for days and have no idea as to
> what the hell is going on. any suggestions are greatly appreciated.
> here's my smb.conf stuff:
> [MP3]
>    comment = MP3
>    path = /export/fs2/mp3
>    guest ok = no
>    browseable = no
>    writable = yes
>    write list = @noc
>    create mask = 0664
>    directory mask = 2775
>    force user = service
>    force group = noc
> 


-- 
------------------------------------
Robin P. Blanchard
IT Program Specialist
Georgia Center for Continuing Ed.
fon: 706.542.2404 fax: 706.542.6546
email: Robin_Blanchard at gactr.uga.edu
------------------------------------




More information about the samba mailing list