Discussion:
problems with eCS client & Linus server
Bart
2009-10-08 16:03:42 UTC
Permalink
If it's not EA-related, maybe Kukks knows? If no help here, goto
irc://freenode/samba-os2 and ask.
I think I'll go looking over there
Still with over 100 smbd processes at any given time

Felix can you answer this?
If ea support is not configured on the server, how is it being handled?
I can set a file as read-only and somehow this information is stored
properly. (as I said before, Netdrive box for ea's is checked)

Bart
Toronto
Bart
2009-10-14 20:21:38 UTC
Permalink
If it's not EA-related, maybe Kukks knows? If no help here, goto
irc://freenode/samba-os2 and ask.
I've been in touch with kukk, but was going to see if enabling ea support would
help my problem before going any further.
I have enabled ea's, but I don't see much change. File access is still spotty.
One error message has gone away: when saving a file, Describe complained it
couldn't write the ea

Otherwise I'm not sure if there is any benefit.

Question: I can set read-only attribute for a file (which I could do before
without ea's enabled BTW), but I can not set hidden attribute for folders nor
files. Is that a Samba thing?
Herwig Bauernfeind
2009-10-15 05:44:25 UTC
Permalink
Post by Bart
If it's not EA-related, maybe Kukks knows? If no help here, goto
irc://freenode/samba-os2 and ask.
I've been in touch with kukk, but was going to see if enabling ea support would
help my problem before going any further.
I have enabled ea's, but I don't see much change. File access is still spotty.
One error message has gone away: when saving a file, Describe complained it
couldn't write the ea
Otherwise I'm not sure if there is any benefit.
Question: I can set read-only attribute for a file (which I could do before
without ea's enabled BTW), but I can not set hidden attribute for folders nor
files. Is that a Samba thing?
Put

store dos attributes = Yes

into smb.conf.

You might want to read through

http://svn.netlabs.org/samba/ticket/15


Kind regards,
Herwig
Bart
2009-10-15 16:04:33 UTC
Permalink
Even with: store dos attributes = Yes
hidden files were not working
I had to explicitly spec map hidden = yes
Output of testparm -vs | grep map is now:
[***@server2 ~]# testparm -vs | grep map
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[printers]"
Processing section "[bvdata]"
Processing section "[cbm_data]"
Processing section "[samba-share]"
Loaded services file OK.
Invalid combination of parameters for service homes.
Map hidden can only work if create mask includes octal 01 (S_IXOTH).
Invalid combination of parameters for service printers.
Map hidden can only work if create mask includes octal 01 (S_IXOTH).
Invalid combination of parameters for service bvdata.
Map hidden can only work if create mask includes octal 01 (S_IXOTH).
Invalid combination of parameters for service cbm_data.
Map hidden can only work if create mask includes octal 01 (S_IXOTH).
Invalid combination of parameters for service samba-share.
Map hidden can only work if create mask includes octal 01 (S_IXOTH).
Server role: ROLE_STANDALONE
map to guest = Never
username map =
use mmap = Yes
os2 driver map =
username map script =
ldap idmap suffix =
homedir map = auto.home
afs username map =
idmap domains =
idmap backend =
idmap alloc backend =
idmap cache time = 900
idmap negative cache time = 120
idmap uid =
idmap gid =
acl map full control = Yes
map acl inherit = No
map archive = Yes
map hidden = Yes
map system = No
map readonly = yes
mangled map =
dmapi support = No

Can you help with these errors?
My current smb.conf has entries like:
[samba-share]
path = /samba-share
guest ok = yes
writeable = yes
browseable = yes
; guest only = yes
force group = nobody
create mask = 0666
directory mask = 0777
; force create mode = 0666
; force directory mode = 0777
Günter Kukkukk
2009-10-16 00:10:07 UTC
Permalink
Post by Bart
Even with: store dos attributes = Yes
hidden files were not working
I had to explicitly spec map hidden = yes
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[printers]"
Processing section "[bvdata]"
Processing section "[cbm_data]"
Processing section "[samba-share]"
Loaded services file OK.
Invalid combination of parameters for service homes.
Map hidden can only work if create mask includes octal 01 (S_IXOTH).
Invalid combination of parameters for service printers.
Map hidden can only work if create mask includes octal 01 (S_IXOTH).
Invalid combination of parameters for service bvdata.
Map hidden can only work if create mask includes octal 01 (S_IXOTH).
Invalid combination of parameters for service cbm_data.
Map hidden can only work if create mask includes octal 01 (S_IXOTH).
Invalid combination of parameters for service samba-share.
Map hidden can only work if create mask includes octal 01 (S_IXOTH).
Server role: ROLE_STANDALONE
map to guest = Never
username map =
use mmap = Yes
os2 driver map =
username map script =
ldap idmap suffix =
homedir map = auto.home
afs username map =
idmap domains =
idmap backend =
idmap alloc backend =
idmap cache time = 900
idmap negative cache time = 120
idmap uid =
idmap gid =
acl map full control = Yes
map acl inherit = No
map archive = Yes
map hidden = Yes
map system = No
map readonly = yes
mangled map =
dmapi support = No
Can you help with these errors?
[samba-share]
path = /samba-share
guest ok = yes
writeable = yes
browseable = yes
; guest only = yes
force group = nobody
create mask = 0666
directory mask = 0777
; force create mode = 0666
; force directory mode = 0777
Hi Bart,

i probably was a bit unclear on irc regarding the meaning of
map archive = Yes
map hidden = Yes
map system = Yes
map readonly = Yes
All these smb.conf "map ..." entries are _always_ related to the
mapping of dos attributes to *nix file/dir permission bits
- see also http://oreilly.com/catalog/samba/chapter/book/ch05_03.html

Cause these mappings to file/dir permissions can have some ugly side-effects,
another approach can be used when *nix xattr are available and enabled:

ea support = yes
store dos attributes = Yes

Now samba will first try to write/read EAs to/from *nix xattr entries,
but as a _fallback_ the permission mapping will still be used, when

map archive = Yes
map hidden = Yes
map system = Yes
map readonly = Yes

is set. See also 'man smb.conf' for "store dos attributes" !
Also note, that the 'testparm' applet is a bit "vague" by still
displaying msgs like "Map hidden can only work if create mask
includes octal 01 (S_IXOTH)."

To avoid/disable this fallback one should use the following:

ea support = yes
store dos attributes = Yes
map archive = No
map hidden = No
map system = No
map readonly = No

Now all dos attributes are written to *nix xattr entries like
user.DOSATTRIB="0x20" - assuming the underlying fs supports xattr.

On the linux side one can use 'getfattr *' or more specific e.g.
linux300:/home/gk/cifstest # getfattr -d inode.c
# file: inode.c
user.DOSATTRIB="0x20"

Cheers, Günter

Note: When dos attributes are stored in *nix xattr, one might need
special copy and/or backup programs on the *nix side to not lose
the extended attributes!
Bart
2009-10-19 19:18:03 UTC
Permalink
Thx Günter
Post by Günter Kukkukk
ea support = yes
store dos attributes = Yes
this is what I had at first, but could could only play with read-only, I could
not play with Hidden (I need to hide one of our directories)
Post by Günter Kukkukk
map hidden = Yes
I tried this when the Hidden attribute would not stick
Now Hidden is sticking
Post by Günter Kukkukk
ea support = yes
store dos attributes = Yes
map archive = No
map hidden = No
map system = No
map readonly = No
I think I understand "store dos attributes" is preferred over "map"
Are you saying I should be able to mark a directory as hidden without the map
parameter, using only "store dos attributes = Yes"?
I can try again I suppose.
Post by Günter Kukkukk
Note: When dos attributes are stored in *nix xattr, one might need
special copy and/or backup programs on the *nix side to not lose
the extended attributes!
Ah yes, we use rsync back up to external USB drive. I will check into this.

I checked attributes on recently created Mesa spreadsheet files:
[***@server2 H&C_Leads]# getfattr *
# file: H&C-leads-Oct09more.M2
user.\012
user..TYPE
user.DOSATTRIB

# file: H&C-leads-Oct09more.M2B
user.\001
user.\012
user..TYPE
user.DOSATTRIB

Many thx,
Bart
Günter Kukkukk
2009-10-20 00:11:08 UTC
Permalink
Am Montag, 19. Oktober 2009 schrieb Bart:

Hi Bart,
Post by Bart
Thx Günter
Post by Günter Kukkukk
ea support = yes
store dos attributes = Yes
this is what I had at first, but could could only play with read-only, I could
not play with Hidden (I need to hide one of our directories)
Post by Günter Kukkukk
map hidden = Yes
I tried this when the Hidden attribute would not stick
Now Hidden is sticking
Post by Günter Kukkukk
ea support = yes
store dos attributes = Yes
map archive = No
map hidden = No
map system = No
map readonly = No
I think I understand "store dos attributes" is preferred over "map"
Are you saying I should be able to mark a directory as hidden without the map
parameter, using only "store dos attributes = Yes"?
I can try again I suppose.
Assuming the underlying file system supports xattr and is configured to use them

ea support = yes
store dos attributes = Yes

is enough to store _all_ dos attributes into the 'user.DOSATTRIB' xattr on
the samba side.

When samba is build, some default mapping (to file
permission bits) is already built-in:
E.g. on this samba-3.4.x box the compiled-in mapping is:
map archive = Yes
map hidden = No
map system = No
map readonly = yes
But this mapping is only used as a fallback in case accessing xattr
is not possible.
So to avoid _all_ mapping to file permission bits one would additionally use:
map archive = No
map hidden = No
map system = No
map readonly = No
to make this clear to the (human) reader of smb.conf.

On this box I'm using these settings. When I use a remote client
to set all dos attributes (archive, hidden, system and read-only),
e.g. ATTRIB +a +s +h +r gkstat.txt
the client correctly reports them set - and also on the server side I get:

getfattr -d gkstat.txt
# file: gkstat.txt
user.DOSATTRIB="0x27"

The "0x27" contains all the currently set attributes bits, which are defined
in the samba source as:

/* these define the attribute byte as seen by DOS */
#define aRONLY (1L<<0) /* 0x01 */
#define aHIDDEN (1L<<1) /* 0x02 */
#define aSYSTEM (1L<<2) /* 0x04 */
#define aVOLID (1L<<3) /* 0x08 */
#define aDIR (1L<<4) /* 0x10 */
#define aARCH (1L<<5) /* 0x20 */

Btw - some good info about ACLs and extended attributes on linux:
http://www.suse.de/~agruen/acl/linux-acls/online/
http://www.suse.de/~agruen/
Post by Bart
Post by Günter Kukkukk
Note: When dos attributes are stored in *nix xattr, one might need
special copy and/or backup programs on the *nix side to not lose
the extended attributes!
Ah yes, we use rsync back up to external USB drive. I will check into this.
# file: H&C-leads-Oct09more.M2
user.\012
user..TYPE
user.DOSATTRIB
# file: H&C-leads-Oct09more.M2B
user.\001
user.\012
user..TYPE
user.DOSATTRIB
Many thx,
Bart
Cheers, Günter
Bart
2009-10-20 01:53:27 UTC
Permalink
Hi Günter

Do these results indicate ea's are set up correctly?
[root <at> server2 H&C_Leads]# getfattr *
# file: H&C-leads-Oct09more.M2
user.\012
user..TYPE
user.DOSATTRIB
# file: H&C-leads-Oct09more.M2B
user.\001
user.\012
user..TYPE
user.DOSATTRIB
More examples...
"EMPLOYEE" is the hidden folder I mentioned, but it does not have the same
output as your example.

# file: EMPLOYEE
user..CLASSINFO
user.DOSATTRIB

# file: NEWS_LET
user..CLASSINFO
user.\342\226\221\0254y\015\004,\034i\005\010

# file: order_form_railing_components
user.DOSATTRIB


Bart
Günter Kukkukk
2009-10-20 02:07:03 UTC
Permalink
Am Dienstag, 20. Oktober 2009 schrieb Bart:
Hi Bart
Post by Bart
Hi Günter
Do these results indicate ea's are set up correctly?
[root <at> server2 H&C_Leads]# getfattr *
# file: H&C-leads-Oct09more.M2
user.\012
user..TYPE
user.DOSATTRIB
# file: H&C-leads-Oct09more.M2B
user.\001
user.\012
user..TYPE
user.DOSATTRIB
More examples...
"EMPLOYEE" is the hidden folder I mentioned, but it does not have the same
output as your example.
# file: EMPLOYEE
user..CLASSINFO
user.DOSATTRIB
On your (os2) client "ATTRIB EMPLOYEE" will list the current attributes.
On the (*nix) server side
getfattr -d EMPLOYEE
will tell you the dos attr in "user.DOSATTRIB"

Yep, i think your (*nix) setup is working right to support EAs.
Post by Bart
# file: NEWS_LET
user..CLASSINFO
user.\342\226\221\0254y\015\004,\034i\005\010
# file: order_form_railing_components
user.DOSATTRIB
Bart
Cheers, Günter

Loading...