Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am exporting a directory via Samba to my home theater PC. Unfortunately XBMC is also displaying some working directories that I happen to be sharing inside that directory.

I would like to find a way to have Samba ignore certain directories so that they are not shared with the other PCs.

This is purely for vanity reasons so the solution doesn't need to be totally perfect (So a workaround would be fine, it doesn't have to be production quality)

share|improve this question

2 Answers 2

up vote 5 down vote accepted

I'm thinking "veto files" is the option you're looking for, as shown here:
http://codesnippets.joyent.com/posts/show/1299
add the line in smb.conf under the particular share to exclude sub-directories explicitly

[myshare]
  path = /var/test
  veto files = /var/test/private/
more syntax examples here: http://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html#VETOFILES

share|improve this answer
1  
The / character in the veto files pattern is not a directory separator. In the example above, provided you add a / at the end to make it syntactically correct, any files or directories named either var, test or private will be hidden. –  Lars Haugseth Jun 28 '13 at 19:11

hide files = file1/file2/$*/System Volume Information also hides the folder from share

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.