VirtualBox

source: vbox/trunk/doc/manual/en_US/man_VBoxManage-sharedfolder.xml@ 105016

Last change on this file since 105016 was 105016, checked in by vboxsync, 5 months ago

doc/manual,include/VBox,Frontends/VBoxManage,HostServices/SharedFolders,
Main/{include,SharedFolder,Console,Machine,VirtualBox.xidl}: Add a
new attribute to ISharedFolder for specifying a symbolic link creation
policy to restrict the source pathname when creating symbolic links
within a guest. The symbolic link policies are represented by a new
enumeration of type SymlinkPolicy_T which includes values for no
restrictions ('any'), symlink sources only within the subtree of the
share ('subtree'), symlink sources as any relative path ('relative'),
and no symlinks allowed ('forbidden'). The symlink policy can only be
applied to permanent shared folders at this stage. bugref:10619

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 10.6 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 manpage, user manual, usage: VBoxManage sharedfolder
4-->
5<!--
6 Copyright (C) 2006-2023 Oracle and/or its affiliates.
7
8 This file is part of VirtualBox base platform packages, as
9 available from https://www.virtualbox.org.
10
11 This program is free software; you can redistribute it and/or
12 modify it under the terms of the GNU General Public License
13 as published by the Free Software Foundation, in version 3 of the
14 License.
15
16 This program is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, see <https://www.gnu.org/licenses>.
23
24 SPDX-License-Identifier: GPL-3.0-only
25-->
26<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
27 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"[
28<!ENTITY % all.entities SYSTEM "all-entities.ent">
29%all.entities;
30]>
31<refentry id="vboxmanage-sharedfolder" lang="en">
32 <refentryinfo>
33 <pubdate>$Date: 2024-06-25 10:28:21 +0000 (Tue, 25 Jun 2024) $</pubdate>
34 <title>VBoxManage sharedfolder</title>
35 </refentryinfo>
36
37 <refmeta>
38 <refentrytitle>VBoxManage-sharedfolder</refentrytitle>
39 <manvolnum>1</manvolnum>
40 </refmeta>
41
42 <refnamediv>
43 <refname>VBoxManage-sharedfolder</refname>
44 <refpurpose>add and remove shared folders, configure security policy for shared folders</refpurpose>
45 <refclass>&product-name;</refclass>
46 </refnamediv>
47
48 <refsynopsisdiv>
49 <cmdsynopsis id="synopsis-vboxmanage-sharedfolder-add">
50<!-- The 'id' is mandatory and must start with 'synopsis-'. -->
51 <command>VBoxManage sharedfolder add</command>
52 <group choice="req">
53 <arg choice="plain"><replaceable>uuid</replaceable></arg>
54 <arg choice="plain"><replaceable>vmname</replaceable></arg>
55 </group>
56 <arg choice="req">--name=<replaceable>share-name</replaceable></arg>
57 <arg choice="req">--hostpath=<replaceable>hostpath</replaceable></arg>
58 <arg>--readonly</arg>
59 <arg>--transient</arg>
60 <arg>--automount</arg>
61 <arg>--auto-mount-point=<replaceable>path</replaceable></arg>
62 </cmdsynopsis>
63
64 <cmdsynopsis id="synopsis-vboxmanage-sharedfolder-remove">
65 <command>VBoxManage sharedfolder remove</command>
66 <group choice="req">
67 <arg choice="plain"><replaceable>uuid</replaceable></arg>
68 <arg choice="plain"><replaceable>vmname</replaceable></arg>
69 </group>
70 <arg choice="req">--name=<replaceable>share-name</replaceable></arg>
71 <arg>--transient</arg>
72 </cmdsynopsis>
73
74 <cmdsynopsis id="synopsis-vboxmanage-sharedfolder-modify">
75 <command>VBoxManage sharedfolder modify</command>
76 <group choice="req">
77 <arg choice="plain"><replaceable>uuid</replaceable></arg>
78 <arg choice="plain"><replaceable>vmname</replaceable></arg>
79 </group>
80 <arg choice="req">--name=<replaceable>share-name</replaceable></arg>
81 <arg choice="req">--symlink-policy=
82 <group choice="plain">
83 <arg choice="plain">forbidden</arg>
84 <arg choice="plain">subtree</arg>
85 <arg choice="plain">relative</arg>
86 <arg choice="plain">any</arg>
87 </group>
88 </arg>
89 </cmdsynopsis>
90 </refsynopsisdiv>
91
92 <refsect1 id="vboxmanage-sharedfolder-description">
93 <title>Description</title>
94 <para>
95 Shared folders enable you to share data between the host system
96 and guests. To use shared folders, you must first install the
97 &product-name; Guest Additions software on the guest OS.
98 </para>
99 <para>
100 The shared folder is associated with a share name and the full
101 path name of the folder or directory on the host system. The share
102 name is a unique name within the namespace of the host OS.
103 </para>
104 <refsect2 id="vboxmanage-sharedfolder-add">
105 <title>Add a Shared Folder</title>
106 <remark role="help-copy-synopsis"/>
107 <para>
108 The <command>VBoxManage sharedfolder add</command> command
109 creates a shared folder. The folder you specify is on the host
110 computer. When configured, the contents of the folder on the
111 host system can be shared with the guest OS.
112 </para>
113 <variablelist>
114 <varlistentry>
115 <term><option><replaceable>uuid</replaceable> | <replaceable>vmname</replaceable></option></term>
116 <listitem><para>
117 Specifies the name or UUID of the guest VM that shares a
118 folder with the host system.
119 </para></listitem>
120 </varlistentry>
121 <varlistentry>
122 <term>--name=<replaceable>share-name</replaceable></term>
123 <listitem><para>
124 Specifies the name of the share, which is a unique name
125 within the namespace of the host OS.
126 </para></listitem>
127 </varlistentry>
128 <varlistentry>
129 <term>--hostpath=<replaceable>hostpath</replaceable></term>
130 <listitem><para>
131 Specifies the absolute path of the folder or directory on
132 the host OS to share with the guest OS.
133 </para></listitem>
134 </varlistentry>
135 <varlistentry>
136 <term>--readonly</term>
137 <listitem><para>
138 Specifies that the share has only read-only access to
139 files at the host path.
140 </para><para>
141 By default, shared folders have read-write access to the
142 files at the host path. However on Linux distributions,
143 shared folders are mounted with 770 file permissions with
144 the <literal>root</literal> user and the
145 <literal>vboxsf</literal> group. By using this option, the
146 file permissions become 700.
147 </para></listitem>
148 </varlistentry>
149 <varlistentry>
150 <term>--transient</term>
151 <listitem><para>
152 Specifies that the share is transient, which means that it
153 can be added and removed at runtime and does not persist
154 after the VM stops.
155 </para></listitem>
156 </varlistentry>
157 <varlistentry>
158 <term>--automount</term>
159 <listitem><para>
160 Specifies that the share is automatically mounted.
161 </para></listitem>
162 </varlistentry>
163 <varlistentry>
164 <term>--auto-mount-point=<replaceable>path</replaceable></term>
165 <listitem><para>
166 Specifies the mount point of the share. This guest OS specific.
167 </para><para>
168 For Windows and OS/2 guest this must be an unused drive letter.
169 If left blank (or if the drive letter is already in use), the
170 last unused drive letter is used instead (i.e. searching from
171 <literal>Z:</literal> thru <literal>A:</literal>).
172 </para><para>
173 For Linux, Solaris and other unix guest, it must be an absolute
174 path like <filename>/mnt/mysharedfolder</filename>. If left
175 empty the default location is
176 <filename>/media/sf_<replaceable>sharename</replaceable></filename>.
177 </para></listitem>
178 </varlistentry>
179 </variablelist>
180 </refsect2>
181 <refsect2 id="vboxmanage-sharedfolder-remove">
182 <title>Remove a Shared Folder</title>
183 <remark role="help-copy-synopsis"/>
184 <para>
185 The <command>VBoxManage sharedfolder remove</command> command
186 removes a shared folder.
187 </para>
188 <variablelist>
189 <varlistentry>
190 <term><option><replaceable>uuid</replaceable> | <replaceable>vmname</replaceable></option></term>
191 <listitem><para>
192 Specifies the name or UUID of the guest VM that shares a
193 folder with the host system.
194 </para></listitem>
195 </varlistentry>
196 <varlistentry>
197 <term>--name=<replaceable>share-name</replaceable></term>
198 <listitem><para>
199 Specifies the name of the share to remove.
200 </para></listitem>
201 </varlistentry>
202 <varlistentry>
203 <term>--transient</term>
204 <listitem><para>
205 Specifies that the share is transient, which means that it
206 can be added and removed at runtime and does not persist
207 after the VM stops.
208 </para></listitem>
209 </varlistentry>
210 </variablelist>
211 </refsect2>
212 <refsect2 id="vboxmanage-sharedfolder-modify">
213 <title>Modify a Shared Folder's Configuration</title>
214 <remark role="help-copy-synopsis"/>
215 <para>
216 The <command>VBoxManage sharedfolder modify</command> command
217 modifies the configuration of a Shared Folder.
218 </para>
219 <variablelist>
220 <varlistentry>
221 <term><option><replaceable>uuid</replaceable> | <replaceable>vmname</replaceable></option></term>
222 <listitem><para>
223 Specifies the name or UUID of the guest VM that shares a
224 folder with the host system.
225 </para></listitem>
226 </varlistentry>
227 <varlistentry>
228 <term>--name=<replaceable>share-name</replaceable></term>
229 <listitem><para>
230 Specifies the name of the share to apply the security policy to.
231 </para></listitem>
232 </varlistentry>
233 <varlistentry>
234 <term>--symlink-policy=<replaceable>policy-name</replaceable></term>
235 <listitem><para>
236 Specifies the symbolic link security policy of the shared folder.
237 Valid symlink security policies are:
238 <literal>forbidden</literal>, <literal>subtree</literal>,
239 <literal>relative</literal>, and <literal>any</literal>.
240 </para></listitem>
241 </varlistentry>
242 </variablelist>
243 </refsect2>
244 </refsect1>
245
246 <refsect1 id="vboxmanage-sharedfolder-examples">
247 <title>Examples</title>
248 <remark role="help-scope" condition="GLOBAL" />
249 <para>
250 The following command creates a shared folder named
251 <filename>o7share</filename> for the <filename>ol7</filename> VM
252 and configures the share to be mounted automatically when the VM
253 is started.
254 </para>
255<screen>$ VBoxManage sharedfolder add ol7 --name ol7share --hostpath "/home/user/ol7share" --automount</screen>
256 <para>
257 The following command removes the shared folder named
258 <filename>o7share</filename> from the <filename>ol7</filename> VM.
259 </para>
260<screen>$ VBoxManage sharedfolder remove ol7 --name ol7share</screen>
261 </refsect1>
262</refentry>
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette