如何让网络共享用户有权限访问已挂载的NTFS驱动器?
如何让网络共享用户有权限访问已挂载的NTFS驱动器?
我刚搭建了一台运行Ubuntu 22.04.2的机器,挂载了3个NTFS硬盘,上面跑着Plex服务器。之前已经遇到过NTFS驱动器的权限问题,唯一能让Plex访问这些驱动器的办法是把plex用户加入plugdev组(但这似乎不太妥当),现在又碰到了网络共享的权限问题。
我本来想把所有驱动器都共享到网络,但直接共享驱动器不行,所以把它们的父文件夹设成了网络共享。从Windows电脑能访问这个父文件夹,但没有权限访问里面挂载的驱动器。我搜了不少解决方案都没用,于是借鉴Plex的处理方式,创建了一个Samba用户,把它加入plugdev组,然后用这个账号在Windows上登录,结果还是失败了。
我刚接触Linux,坚持用NTFS驱动器的选择一直在坑我,但我有10TB的资料,不想先挪走再重新格式化,所以希望能找到解决权限问题的办法。
补充信息:
1. testparm -s 命令输出:
Loaded services file OK. Weak crypto is allowed Server role: ROLE_STANDALONE # Global parameters [global] log file = /var/log/samba/log.%m logging = file map to guest = Bad User max log size = 1000 obey pam restrictions = Yes pam password change = Yes panic action = /usr/share/samba/panic-action %d passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . passwd program = /usr/bin/passwd %u server role = standalone server server string = %h server (Samba, Ubuntu) unix password sync = Yes usershare allow guests = Yes idmap config * : backend = tdb [printers] browseable = No comment = All Printers create mask = 0700 path = /var/spool/samba printable = Yes [print$] comment = Printer Drivers path = /var/lib/samba/printers
2. net usershare info --long 命令输出:
path=/media/maddie comment= usershare_acl=Everyone:F, guest_ok=y [test] path=/media/maddie comment= usershare_acl=Everyone:F, guest_ok=n info_fn: file /var/lib/samba/usershares/media tres is not a well formed usershare file. info_fn: Error was Path is not a directory. info_fn: file /var/lib/samba/usershares/media uno is not a well formed usershare file. info_fn: Error was Path is not a directory. [Cathleen] path=/media/maddie comment= usershare_acl=Everyone:F, guest_ok=y info_fn: file /var/lib/samba/usershares/media dos is not a well formed usershare file. info_fn: Error was Path is not a directory.
3. /etc/fstab 配置文件内容:
# /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> # / was on /dev/sdb4 during installation UUID=bf960de8-2057-4851-bc1e-0f9d5909495e / ext4 errors=remount-ro 0 1 # /boot/efi was on /dev/sdb5 during installation #UUID=EC82-3A04 /boot/efi vfat umask=0077 0 1 # /media/media-dos was on /dev/sda2 during installation # /media/media-tres was on /dev/sdb2 during installation # /media/media-uno was on /dev/sdd2 during installation UUID=4E3ECAE03ECABFE7 /media/maddie/media-dos ntfs defaults,umask=007,gid=46,nosuid,nodev,nofail 0 1 UUID=EA5C0C235C0BE961 /media/maddie/media-tres ntfs defaults,umask=007,gid=46,nosuid,nodev,nofail 0 1 UUID=98082E22082E003C /media/maddie/media-uno ntfs defaults,umask=007,gid=46,nosuid,nodev,nofail 0 1
备注:内容来源于stack exchange,提问作者rustol
相关产品推荐
相关产品推荐

