VirtualBox

Opened 9 years ago

Last modified 9 years ago

#13568 new defect

mount vboxsf won't accept option "user"

Reported by: juanlu001 Owned by:
Component: shared folders Version: VirtualBox 4.3.18
Keywords: Cc:
Guest type: Linux Host type: Linux

Description

Even though the vbox shared folders can be mounted through mount(8) and a usual /etc/fstab entry can be created, some options accepted by mount won't work for vboxsf, e.g. "user" and "group".

juanlu@minted ~ $ tail /etc/fstab
# mint shared folder
mint /media/sf_mint vboxsf defaults,user,uid=1000,gid=999 0 0
juanlu@minted ~ $ mount mint
Only root can mount shared folders from the host.
juanlu@minted ~ $ sudo !!
sudo mount mint
unknown mount option `user'
valid options:
  rw         mount read write (default)
  ro         mount read only
  uid       =<arg> default file owner user id
  gid       =<arg> default file owner group id
  ttl       =<arg> time to live for dentry
  iocharset =<arg> i/o charset (default utf8)
  convertcp =<arg> convert share name from given charset to utf8
  dmode     =<arg> mode of all directories
  fmode     =<arg> mode of all regular files
  umask     =<arg> umask of directories and regular files
  dmask     =<arg> umask of directories
  fmask     =<arg> umask of regular files

This might be just a non-implemented feature in mount.vboxsf.c. If it's not, then probably a clarification is needed in the user manual that not all mount(8) options are allowed for vboxsf, and in that case it would be nice to have a rationale of why is that.

Change History (1)

comment:1 by juanlu001, 9 years ago

Just to add some more information, as suggested by harrymc in StackOverflow,

"The check for being executed under the root account is done immediately in main() at the start of the program, and before the parameters were processed, so before the user parameter was detected or processed.

The check should have been done much later, after the effective user ID of the process (or its fork) was changed to the specified user account."

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use