Change directory_create_or_exist()

simo idra at
Wed May 18 12:17:35 MDT 2011

On Wed, 2011-05-18 at 18:33 +0100, Jelmer Vernooij wrote:
> On Tue, 2011-05-17 at 15:40 +0200, Andreas Schneider wrote:
> > 
> > on the buildfarm we see currently the error.
> > 
> > invalid permissions on directory 
> > '/memdisk/build/samba_4_0_test/st/client/ncalrpcdir': has 0700 should be 0755
> > ../source4/smbd/service_named_pipe.c:206: Failed to create ncalrpc pipe 
> > directory '/memdisk/build/samba_4_0_test/st/client/ncalrpcdir' - 
> > 
> > Wouldn't it make sense that we try a chmod() to fix the permissions on the 
> > directory before we fail?
> That directory can be one that's specified by the user; I'm not sure if
> it's a good idea to automatically change the permissions of a user
> directory, especially making it more public than it was before.
> In this case, perhaps we should just do the right thing when we create
> it?

What is the right thing ?

The problem here is that abartlet changed the previous default, it was
700 and now it is 755, this means that on upgrade we just fail as the
permissions will be wrong.

I guess an alternative approach is to not change the permissions, but
instead change directory_create_or_exist() to consider valid any
permissions that are equal OR stricter than the ones passed in ?
And just emit a loud warning at level 0 about them not matching the
requested permission set ?


Simo Sorce
Samba Team GPL Compliance Officer <simo at>
Principal Software Engineer at Red Hat, Inc. <simo at>

More information about the samba-technical mailing list