DOS mode bits missing from Folders

Jean Francois Micouleau Jean-Francois.Micouleau at dalalu.fr
Wed Jan 22 21:54:00 GMT 2003


On Wed, 22 Jan 2003, Pagani Jr, Ronald wrote:

> Why not store DOS bit modes in an accompanying dot file?  (The DOS
> modes then read by smbd if it (the dot file) exists)

this idea has already been bitten to death. When you backup files, you
have to backup the dot file. Renaming is more complex. What does happen if
you delete the file from the unix side and create a new file with the same
name ?

A more elegant solution is to use EA.

	J.F.



> On Monday, January 20, 2003, at 10:04 AM, Gerald (Jerry) Carter wrote:
>
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > On Tue, 14 Jan 2003, Esh, Andrew wrote:
> >
> >> I have a question about the following piece of code in HEAD
> >> smbd/dosmode.c,
> >> at line 139:
> >>
> >> 	if (S_ISDIR(sbuf->st_mode))
> >> 		result = aDIR | (result & aRONLY);
> >>
> >> This causes the DOS mode "HSA" Hidden, System, and Archive bits to be
> >> stripped off if a folder is being processed. This makes it impossible
> >> to
> >> store these bits on a Samba server. Windows allows them to be stored
> >> for
> >> folders, except for the "S" System bit.
> >>
> >> Why are these bits being stripped off folders?
> >>
> >> Shouldn't it be:
> >>
> >> 	if (S_ISDIR(sbuf->st_mode))
> >> 		result |= aDIR;
> >>
> >> When I made that change, folders began to retain DOS bits like the
> >> ones
> >> stored on Windows do.
> >
> > The e(X)exute bits are special on folders.  For example, if you remove
> > the
> > archive (user 'x' bit) from a directory, you will not be able to
> > change to
> > that directory.
> >
> > The DOS mode bit stuff really needs a better solution.
> >
> >
> >
> > cheers, jerry
> >  ----------------------------------------------------------------------
> >  Hewlett-Packard            ------------------------- http://www.hp.com
> >  SAMBA Team                 ---------------------- http://www.samba.org
> >  GnuPG Key                  ---- http://www.plainjoe.org/gpg_public.asc
> >  ISBN 0-672-32269-2         "SAMS Teach Yourself Samba in 24 Hours" 2ed
> >  "You can never go home again, Oatman, but I guess you can shop there."
> >                             --John Cusack - "Grosse Point Blank" (1997)
> >
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.2.0 (GNU/Linux)
> > Comment: For info see http://quantumlab.net/pine_privacy_guard/
> >
> > iD8DBQE+LDpKIR7qMdg1EfYRAvkiAJ9cA8Gm9t9iPSBeYudtluJxJRuZ6ACfT3k7
> > ExM1uo7m6Eaf5RGXO6Y8wLQ=
> > =WSgs
> > -----END PGP SIGNATURE-----
> >
>
>
>




More information about the samba-technical mailing list