mount - Change directory ownership on mounted drive - Ask Ubuntu
i have dual-boot windows 10/xubuntu 16.04 set up. both share small ssd boot, , both have home directories on data drives.
for xubuntu, /dev/sdc data drive, , it's mounted @ /mnt/archives. when ran usermod -d /mnt/archives/mike mike against user move home drive data drive, worked fine after reboot. when changed home directory, had /dev/sdc mount under id=0,gid=0, mounting root. changed mount id=mike,gid=mount_group, , rebooted computer. however, when go run sudo chown -r mike:mount_group /mnt/archives/mike/*, doesn't change of permissions. :/
here /etc/fstab file:
# cat /etc/fstab # /etc/fstab: static file system information. # # use 'blkid' print universally unique identifier # device; may used uuid= more robust way name devices # works if disks added , removed. see fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> # / on /dev/sdd3 during installation uuid=8db38c8f-87b6-4174-a439-fd60dbb7b313 / ext4 errors=remount-ro 0 1 /dev/sdc /mnt/archives auto rw,relatime,user_id=mike,group_id=mount_group,allow_other,blksize=4096 here sample of directory:
# ls -lah /mnt/archives/mike/ total 88k drwxrwxrwx 1 root root 8.0k oct 23 15:50 . drwxrwxrwx 1 root root 4.0k oct 23 14:30 .. drwxrwxrwx 1 root root 0 oct 3 23:05 .adobe drwxrwxrwx 1 root root 4.0k oct 3 23:36 anaconda2 drwxrwxrwx 1 root root 0 oct 9 00:14 .astropy drwxrwxrwx 1 root root 0 oct 9 00:19 .aws -rwxrwxrwx 1 root root 6.5k oct 23 15:49 .bash_history -rwxrwxrwx 1 root root 220 oct 3 22:24 .bash_logout -rwxrwxrwx 1 root root 948 oct 23 14:33 .bash_profile -rwxrwxrwx 1 root root 3.8k oct 23 14:34 .bashrc -rwxrwxrwx 1 root root 3.7k oct 3 23:36 .bashrc-anaconda2.bak drwxrwxrwx 1 root root 4.0k oct 23 16:01 .cache drwxrwxrwx 1 root root 0 oct 8 17:21 .conda ... how can fix odd permissions issue?
the problem in chmod -r command. * in command excluding actual mike/ portion of space. default * doesn't see dot . in intended immediate directory.
these commands achieve looking for. first, it's common users mistakenly change owner of home's root director or of files , folders in space. can corrected with:
$ sudo chown -r $user:$user ~/ or in case of command in question, use this:
$ sudo chown -r mike:mount_group /mnt/archives/mike/
Comments
Post a Comment