Hide .svn files on a samba share

Found myself in a situation where I was editing and uploading some files through Dreamweaver on a windows box. The files were accessed via a mounted samba share on a debian server.

Didn’t want dreamweaver to see all the .svn directories and files under them (so uploading a folder from dreamweaver would skip uploading the .svn stuff).

(thanks to Gabriel for the easy solution)

[homes]
veto files = /.svn/

 

 

old complex solution follows:

On the samba server I set these options under the [file share] section:

hide unreadable = yes
hide unwriteable files = yes

and restarted samba.

Then make all the .svn folders unreadable by my samba user like this:

# cd /path/to/samba/share
# chown myusername: . -R
# for i in `find . -name .svn `; do echo “setting $i”; chown -R othername: $i; chmod o-rwx $i; done;

that way all the .svn folders will be owned by othername and not accessible by the samba user myusername, samba will hide this folder from the windows box…

now I can edit and upload files from dreamweaver whilst commiting svn changes through a terminal at the same time.

Leave a Reply

Your email address will not be published. Required fields are marked *