Estou usando o Ubuntu 18.04.
Vou montar SD, USB em uma pasta específica.
Eu quero 777 permissões para essa pasta montada.
No entanto, após a montagem, as permissões serão redefinidas.
Eu quero saber como definir as permissões da pasta montada para 777.
root@mount-test:/work/test# pwd
/work/test
root@mount-test:/work/test#
root@mount-test:/work/test# whoami
root
root@mount-test:/work/test#
root@mount-test:/work/test# ls
root@mount-test:/work/test# ls -al
Total 8
drwxr-xr-x 2 root root 4096 6월 22 13:43 .
drwxr-xr-x 11 root root 4096 6월 22 13:42 ..
root@mount-test:/work/test#
root@mount-test:/work/test# mkdir mnt
root@mount-test:/work/test# ls -al
Total 12
drwxr-xr-x 3 root root 4096 6월 22 13:43 .
drwxr-xr-x 11 root root 4096 6월 22 13:42 ..
drwxr-xr-x 2 root root 4096 6월 22 13:43 mnt
root@mount-test:/work/test#
root@mount-test:/work/test# chmod 777 mnt
root@mount-test:/work/test# ls -al
Total 12
drwxr-xr-x 3 root root 4096 6월 22 13:43 .
drwxr-xr-x 11 root root 4096 6월 22 13:42 ..
drwxrwxrwx 2 root root 4096 6월 22 13:43 mnt
root@mount-test:/work/test#
root@mount-test:/work/test#
root@mount-test:/work/test# ls /dev/sdb*
/dev/sdb /dev/sdb1
root@mount-test:/work/test#
root@mount-test:/work/test# mount /dev/sdb1 mnt
root@mount-test:/work/test# ls -al
Total 24
drwxr-xr-x 3 root root 4096 6월 22 13:43 .
drwxr-xr-x 11 root root 4096 6월 22 13:42 ..
drwxr-xr-x 12 root root 16384 1월 1 1970 mnt
root@mount-test:/work/test#
Eu resolvi isso usando a
umask
opção domount
comando.