udisks2 - acl 无法获得普通用户的写入权限

udisks2 - acl 无法获得普通用户的写入权限

外部存储设备已成功安装到 /run/media/myuser/ 通过udisks2udisksdservice ). I can read data from devices. However I can NOT write to them. I'm trying to edit directory ACLs in order to get write permissions for regularmyuser` 我登录时使用(不是 root)

默认权限如下:

getfacl /run/media                                                                                                                                                                                                                   
getfacl: Removing leading '/' from absolute path names                                                                                                                                                                                        
# file: run/media
# owner: root
# group: root
user::rwx
group::r-x
mask::r-x
other::r-x


getfacl /run/media/myuser                                                                                                                                                                                                            
getfacl: Removing leading '/' from absolute path names                                                                                                                                                                                       # file: run/media/myuser
# owner: root
# group: root
user::rwx
group::---
mask::---
other::---


getfacl /run/media/myuser/mydisk                                                                                                                                                                                  
getfacl: Removing leading '/' from absolute path names                                                                                                                                                                                        
# file: run/media/myuser/mydisk
# owner: myuser                                                                                                                                                                                                                               
# group: myuser                                                                                                                                                                                                                               
user::rwx
group::---
other::---

上面的默认设置阻止我将数据写入已安装的设备/run/media/mydisk。我尝试向 myuser 添加 /run/media/myuser 目录的写入 acl 权限。

getfacl /run/media/myuser                                                                                                                                                                                                            
getfacl: Removing leading '/' from absolute path names                                                                                                                                                                                        
# file: run/media/myuser
# owner: root
# group: root
user::rwx
user:myuser:rwx
group::---
mask::rwx
other::---

然而这并没有改变任何事情。
请注意,即使使用 sudoleved ,我也无法将任何数据写入已安装的设备myuser。请问,我该如何解决这个问题,以便我可以将数据写入已安装的设备?

Linux myuser 4.11.9-1-ARCH #1 SMP PREEMPT 2017 年 7 月 5 日星期三 18:23:08 CEST 2017 x86_64 GNU/Linux

systemctl status udisks2                         
● udisks2.service - Disk Manager                           
   Loaded: loaded (/usr/lib/systemd/system/udisks2.service; disabled; vendor preset: disabled)
   Active: active (running) since Tue 2017-07-18 01:32:51 CEST; 11min ago                                              
     Docs: man:udisks(8)                                   
 Main PID: 549 (udisksd)                                   
    Tasks: 5 (limit: 4915)                                 
   CGroup: /system.slice/udisks2.service                   
           └─549 /usr/lib/udisks2/udisksd

Jul 18 01:32:51 myuser systemd[1]: Starting Disk Manager...
Jul 18 01:32:51 myuser udisksd[549]: udisks daemon version 2.7.0 starting
Jul 18 01:32:51 myuser udisksd[549]: Acquired the name org.freedesktop.UDisks2 on the system message bus
Jul 18 01:32:51 myuser systemd[1]: Started Disk Manager.   
Jul 18 01:32:52 myuser udisksd[549]: g_variant_new_string: assertion 'string != NULL' failed
Jul 18 01:32:52 myuser udisksd[549]: Mounted /dev/sdd1 at /run/media/myuser/mydisk on behalf of uid 1000

答案1

显然,默认的内核ntfs驱动程序以只读模式安装设备。更多信息这里

解决方案:

sudo pacman -S ntfs-3g

相关内容