首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何将分区挂载为普通(非根) uesr?

如何将分区挂载为普通(非根) uesr?
EN

Ask Ubuntu用户
提问于 2020-04-24 08:54:07
回答 1查看 974关注 0票数 0

我有一个双引导设置,Ubuntu和Windows之间共享了几个NTFS分区。我希望这些分区在启动时自动挂载,但作为普通用户,因为作为根的挂载有时会给我带来像这样的问题。我尝试用fstab挂载,但它将分区挂载为根。实用程序pmount仅适用于可移动驱动器。

是否有任何实用工具或脚本可用于在启动时作为普通用户(如文件管理器)挂载这些分区?

EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2020-04-24 15:22:08

阅读man mount.ntfs,它将告诉您如何将分区挂载为用户(带有uid=gid参数)。来自man mount.ntfs页面:

代码语言:javascript
复制
Access Handling and Security
   By default, files and directories are owned by the effective user and group of the mounting process, and  everybody  has
   full  read,  write,  execution  and directory browsing permissions.  You can also assign permissions to a single user by
   using the uid and/or the gid options together with the umask, or fmask and dmask options.

   Doing so, Windows users have full access to the files created by ntfs-3g.

   But, by setting the permissions option, you can benefit from the full ownership and permissions features as  defined  by
   POSIX. Moreover, by defining a Windows-to-Linux user mapping, the ownerships and permissions are even applied to Windows
   users and conversely.

   If ntfs-3g is set setuid-root then non-root users will be also able to mount volumes.

但是,root仍然存在(因为“挂载”是一个系统级别的事情),而不可挂载的NTFS驱动器将导致它挂起--它们是自动安装的,所以不要在/etc/fstab条目中使用auto

阅读man mount,特别是有关user参数的内容:

代码语言:javascript
复制
   The non-superuser mounts.
          Normally, only the superuser can mount filesystems.  However, when fstab contains the user option on a line, any‐
          body can mount the corresponding filesystem.
票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1230170

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档