File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,11 @@ Start server on port 8080, root directory is /usr/share/doc:
35
35
ghfs -l 8080 -r /usr/share/doc
36
36
```
37
37
38
- Start server on default port, root directory is /tmp, and allow upload files to file system directory /tmp /data:
38
+ Start server on default port, root directory is /var/ tmp, and allow upload files into . /data:
39
39
``` sh
40
- ghfs -r /tmp -u /data
40
+ ghfs -r /var/tmp -u /data
41
+ # or
42
+ ghfs -r /var/tmp --upload-dir /var/tmp/data
41
43
```
42
44
43
45
Share files from /etc, but also mount /usr/share/doc to url path /doc
@@ -69,6 +71,11 @@ Http Basic Auth:
69
71
ghfs --auth /files --user user1:pass1 --user-sha1 user2:8be52126a6fde450a7162a3651d589bb51e9579d
70
72
```
71
73
74
+ Share /data, grant upload permission on /data/upload to user "admin" and "root", others are read only:
75
+ ``` sh
76
+ ghfs -r /data --user admin:adminpass root:rootpass user1:user1pass user2:user2pass --upload-user :/upload:admin:root
77
+ ```
78
+
72
79
Start 2 virtual hosts:
73
80
- server 1
74
81
- listen on port 80 for http
Original file line number Diff line number Diff line change @@ -35,9 +35,11 @@ ghfs -l 8080
35
35
ghfs -l 8080 -r /usr/share/doc
36
36
```
37
37
38
- 在默认端口启动服务器,根目录为/tmp,并允许上传文件到/tmp /data:
38
+ 在默认端口启动服务器,根目录为/var/ tmp,并允许上传文件到. /data:
39
39
``` sh
40
- ghfs -r /tmp -u /data
40
+ ghfs -r /var/tmp -u /data
41
+ # 或
42
+ ghfs -r /var/tmp --upload-dir /var/tmp/data
41
43
```
42
44
43
45
共享/etc下的文件,同时把/usr/share/doc挂载到URL路径/doc下:
@@ -68,6 +70,11 @@ http基本验证:
68
70
ghfs --auth /files --user user1:pass1 --user-sha1 user2:8be52126a6fde450a7162a3651d589bb51e9579d
69
71
```
70
72
73
+ 共享/data,授予用户“admin”和“root”在/data/upload的上传权限,其他用户只读:
74
+ ``` sh
75
+ ghfs -r /data --user admin:adminpass root:rootpass user1:user1pass user2:user2pass --upload-user :/upload:admin:root
76
+ ```
77
+
71
78
启动2台虚拟主机:
72
79
- 服务器1
73
80
- 在80端口提供http服务
You can’t perform that action at this time.
0 commit comments