Question on streams dir structure creation.
jra at samba.org
Wed Oct 19 00:01:22 UTC 2016
On Tue, Oct 18, 2016 at 06:46:02PM +0000, Hemanth Thummala wrote:
> Hello All,
> I see that in stream_dir(), mode “0755” is explicitly used to create the streams two level directory structure(ex: .streams/AB/CF/<16-byte-fileid>.
> "SMB_VFS_NEXT_MKDIR(handle, tmp_fname, 0755)"
> This works fine when the first use coming in creating a stream file. Internal stream directory structure is getting created by this user id. And he becomes the owner of the entire stream dir path.
> But we are seeing the permissions issue when second user is trying to create the final streams directory(16-byte string). Mkdir is failing with permission denied error. This is due the fact that second user falls into group or others unix group for which there is no write access. I would like to know if using this 755 mode is intentional for streams directory structure for some reason.
> Please let me know.
Are you using this with the default streams_depot:directory
path of /share/dir/.streams ? Or have you set this to something
If the client is blocked from getting access to the streams
depot directory then you can open this up as wide as you
Looking at the code, the default streams dir code is wrong,
tmp = talloc_asprintf(talloc_tos(), "%s/.streams", handle->conn->connectpath);
tmp = talloc_asprintf(talloc_tos(), "%s/.streams", handle->conn->cwd);
More information about the samba-technical