You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy / symlink the resulting `vfs_python.so` to `/usr/local/samba/lib/vfs/python.so` (or wherever your VFS modules are).
16
+
17
+
In your smb.conf, enable vfs_python per share:
18
+
19
+
[myshare]
20
+
path = /tmp
21
+
vfs objects = python
22
+
python:script = /path/to/your/handler.py
23
+
24
+
and make sure that the script path is valid.
25
+
26
+
The Python code
27
+
-------------------
28
+
Take a look at [the `handler.py`](https://github.com/vortec/vfs_python/blob/master/handler.py) to see how it looks like and which Samba calls are supported at the moment (hint: not too many).
29
+
30
+
When a user performs an action, the corresponding Python function will be called. You can either allow or deny that action by returning a boolean.
31
+
32
+
The Python script will be imported every time a user connects and is valid for the duration of the connection.
0 commit comments