0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

MountしたドライブのDirのOwnerが変更できない

Posted at

問題

外付けSSDをUbuntu 22.05にさしてMountしたディレクトリ・ファイルのOwershipが変更出来ない。

ubuntu:/mnt/data# chown satoshi:satoshi satoshi_home/
chown: 'satoshi_home/' の所有者を変更中: 許可されていない操作です

sudoでやっても、rootでログインしても同じ。

環境

Ubuntu 22.05

結論

Mountする際に、マウントする際にuidとgidを指定する。

ubuntu:/mnt/data$ sudo mount -t exfat -o rw,uid=1002,gid=1002 /dev/sdc1 /mnt/data

hiro@ubuntu:/mnt/data$ ls -la
合計 644
drwxr-xr-x 6 satoshi satoshi 131072 Jul 5 19:07 .
drwxr-xr-x 5 root root 4096 Jul 4 22:18 ..
drwxr-xr-x 2 satoshi satoshi 131072 Jul 5 18:51 satoshi_home

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?