Summary | MKDIR Regression with newer SAMBA versions |
Queue | Gollem |
Queue Version | 1.0.3 |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | chuck (at) horde (dot) org |
Requester | felix.leimbach (at) gmx (dot) net |
Created | 11/27/2007 (6505 days ago) |
Due | |
Updated | 11/30/2007 (6502 days ago) |
Assigned | 11/27/2007 (6505 days ago) |
Resolved | 11/30/2007 (6502 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
Assigned to Chuck Hagenbuch
State ⇒ Resolved
http://lists.horde.org/archives/cvs/Week-of-Mon-20071126/072815.html
Thanks!
New Attachment: gollem-smb.patch
* also fixes file deletion and recursive folder deletion
* doesn't use rexexps any more
The patch passed the following tests on both samba-3.0.24 and 3.0.27a:
* create root level folders
* create subfolders
* create files in subfolders
* delete files in subfolders
* delete folder with subfolders and files in those subfolders
While I'm using it in production now I recommend you give it a bit of
testing with other samba versions and environments as I cannot do that.
to apply it (though I'd fix the patch to not use a regexp when it
really doesn't need it). I'll commit in a day or so if there's no
negative feedback.
Is this perhaps the same issue with deleting? Any progress there?
developer feedback.
Even if it gets fixed soon I propose you put a warning about the
incompatibility in gollem's readme with a link to this ticket. Distros
will carry the affected samba versions for some time and people will
stumble over the issue.
http://lists.samba.org/archive/samba/2007-November/136617.html
New Attachment: gollem-smb-foldercreation.patch
devs intended. I remember reading something about an intended small
smbclient syntax change a while ago but can't find it anymore.
Attached a workaround for the folder-creation problem. When patched,
gollem properly creates folders with new AND old samba versions, so no
harm in applying that one.
Also I found out that there are more operations which don't work after
the samba upgrade. Deleting files f.ex. yields this error:
Cannot delete "test.txt": "/temp/test.txt" is not a directory.
Don't have time for further investigation and patching now, but might
return to it later.
State ⇒ Feedback
that. It should be fixed in smbclient.
The critical statement sent by _command() in lib/VFS/smb.php:
/usr/bin/smbclient "//1.2.3.4/sharename" "-p139" "-Uusername" -D
"/temp" -I 1.2.3.4 -c "mkdir \"subdir1\";"
When fired from the command line this statement does what expected in
samba-3.0.24 and misbehaves as described in the bugreport with
samba-3.0.25c and higher.
SOLUTION:
Appending a backslash in the -D argument solves the problem FOR BOTH
SAMBA VERSIONS:
/usr/bin/smbclient "//1.2.3.4/sharename" "-p139" "-Uusername" -D
"/temp/" -I 1.2.3.4 -c "mkdir \"subdir1\";"
Will create a patch to smb.php soon.
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Queue ⇒ Gollem
Summary ⇒ MKDIR Regression with newer SAMBA versions
Type ⇒ Bug
Problem with 3.0.25c and newer:
* Creating a folder "folder2" in ROOT/folder1 results in
ROOT/folder1folder2 being created
* Creating a folder "folder3" in ROOT/folder1/folder2 results in
ROOT/folder1/folder2folder3 being created
3.0.24 and lower work as expected.
Horde Framework: 3.1.4
The $dir and $mkdir variables in lib/VFS/smb.php's createFolder() are
the same, regardless of the samba version:
Trying to create ROOT/temp/subdir1: $dir=/temp $mkdir=subdir1