Samba VFS


#1

Below is a snippet of code from our old Samba3 systems running on CentOS 5.4.

This is an except from the smb.conf for a particular share on our old (yet to be depricated) Samba3 systems running on CentOS 5.2

[F_drive]
	comment = User Files, etc...
	path = /sec/Fdrive
	write list = +secall, +secadmins, nobody
	read only = No
	inherit permissions = Yes
	veto oplock files = /*.xls/*.xlsx/*.pst/
	vfs objects = recycle
          recycle:versions = yes
	  recycle:noversions = *.pst
	  recycle:excludedir = /temp /tmp
	  recycle:maxsize = 0
	  recycle:exclude = *.tmp *.TMP *.bak *.BAK *.~pr ~*.*
	  recycle:touch = Yes
	  recycle:keeptree = Yes
	  recycle:repository = .recycle/%U
  	  recycle:directory_mode = 0750
          recycle:subdir_mode = 0700

My question is how do I add this particular VFS OBJECT (RECYCLE) on Univention 3.0.2? I see the ability to within the GUI, but there is little or no information on how to format the information.
What if I edit the share on Univention under /etc/samba/shares.conf.d ??? Will I have problems from the GUI afterwards?

Any help is appreciated,
Thanks!


#2

Hello,

you should be able to set your VFS options by setting values like the following one line in the GUI field

"vfs objects = recycle"           "recycle:versions = yes"      "recycle:noversions = *.pst"      "recycle:excludedir = /temp/tmp"      "recycle:maxsize = 0"      "recycle:exclude = *.tmp *.TMP *.bak *.BAK *.~pr ~*.*"      "recycle:touch = Yes"      "recycle:keeptree = Yes"      "recycle:repository = .recycle/%U"        "recycle:directory_mode = 0750"           "recycle:subdir_mode = 0700"

The “key = values” items should be written between “”.

Edited changes in the file under “/etc/samba/shares.conf.d” will be overwritten when the files are regenereated by the system on changing samba configurations.

Kind Regards
Tobias Scherer


#3

Done as suggested.

Now in the UCS share /etc/samba/shares.conf.d/M_Midland I see the following:

[M_Midland] path = /sec/M_drive vfs objects = acl_xattr "vfs objects = recycle" "recycle:versions = yes" "recycle:noversions = *.pst" "recycle:excludedir = /temp/tmp" "recycle:maxsize = 0" "recycle:exclude = *.tmp *.TMP *.bak *.BAK *.~pr ~*.*" "recycle:touch = Yes" "recycle:keeptree = Yes" "recycle:repository = .recycle/%U" "recycle:directory_mode = 0750" "recycle:subdir_mode = 0700" msdfs root = no writeable = yes browseable = yes public = no dos filemode = no hide unreadable = no create mode = 0744 directory mode = 0755 force create mode = 00 force directory mode = 00 security mask = 0777 directory security mask = 0777 force security mode = 00 force directory security mode = 00 locking = 1 blocking locks = 1 strict locking = 0 oplocks = 1 level2 oplocks = 1 fake oplocks = 0 csc policy = manual nt acl support = 1 inherit acls = 0 inherit owner = no inherit permissions = no

This is proper? I am just asking as the Items with “Quotes” are new to me inside of smb.conf files.


#4

Hello,

it’s a bit unusual but if it works it should be ok. Does it work for you?
I just did a quick test with “testparm” to ensure the “key value” pairs stay correctly formatted.

Additionally I filed an enhancement request addressing this case in our Bug Tracker.

Regards.
Tobias Scherer


#5

I agree, TESTPARM does not show an error for this particular data. I guess I will have to test if the values are being parsed properly, or perhaps ignored.





#6

Hello,

I missed the obvious solution on this until now. You should be able to add your parameters in the GUI by putting them into the fields under:
Shares: -> [Advanced settings] -> Samba custom settings -> Custom share settings
Here you can provide multiple key = value pairs.

Regards
Tobias Scherer


#7

I hadn’t even thought to look there since I saw a location for VFS Objects on the Samba General tab.

Thanks!


#8

I added all of the items shown above. Everything seemed to work aside from one item. Reviewing with testparm, I noticed that one of the pairs did not work right away.
When I added the pair “vfs objects = recycle”, it removed “vfs objects = acl_xattr”
So I changed it to “vfs objects = recycle, acl_xattr”