Olf fashioned 'anonynous' FTP 'incoming' directory

Dirk-Willem van Gulik Dirk-Willem.van.Gulik at bbc.co.uk
Thu Jan 6 11:01:28 MST 2011


On 6 Jan 2011, at 17:56, TAKAHASHI Motonobu wrote:

> 2011/1/7 Jelmer Vernooij <jelmer at vernstok.nl>:
>>> Hmm - trying this gives me a denied on the very mount itself (due to the 1777 of the directory). And looking at the log level all:99 output - that is because /ssome/where/incoming does not allow opendir() by the default smbd daemon.
>> What version of Samba are you running ? I think TAKAHASHI Motonobu's
>> configuration snippet is for Samba 3.
> 
> I tested on Samba 3.5.6.
> The original question does not assume Samba 4, I think.

Correct - though 4 seems to behave the same*.

> 2011/1/7 Dirk-Willem van Gulik <Dirk-Willem.van.Gulik at bbc.co.uk>:
>> Tested on Version 3.0.37. Error is on mount - 'incoming' shown in the share list; xs denied on mount (regardless of mounting user, just post smbd/service.c:make_connection_snum(1042)  connect to service hidden2 xxx as user yy (uid=x, gid=x) (pid x)'.
> 
> I tested to connect from a Windows XP client to the share and copy a text file.
> I found the file just copied can not appear in the folder, but if I
> type 'type file.txt', then the
> content of the file is displayed.
> 
> Your 'cifs' means mount with mount.cifs?

Yes - let me do this again with the same version as you (mine was older) - and with all debug logging fully switched on.

Dw.

*: looking at the code - I am wondering though how this would work - as the code seems to always do a directory walk - and assumes it can do an opendir() on ever directory in the path. However opendir() will fail on a leaf-directory which is --x--x--x (0111) while a stat/opendir on a directory deeper down which itself is readable - will succeed provided the 'x' of the directory earlier is for the right uid/gid or an other.


More information about the samba-technical mailing list