关于/ etc / fstab和chown

时间:2016-12-16 06:08:48

标签: linux chown fstab

我已将/ dev / sdb2挂载到/ etc / fstab中的/ base,如下所示:

/dev/sda1   /base   ntfs    defaults,user,errors=remount-ro 0   0

然后/基地像这样:

-rwxrwxrwx  1 root root     29696 Oct 19 00:11 Mac-OS-Lion(Docky).tar*
drwxrwxrwx  1 root root         0 Dec  8 18:13 MySQL/

尝试chown:

DevOps mysql # ll /base/MySQL/
total 40
drwxrwxrwx 1 root root     0 Dec  8 18:13 ./
drwxrwxrwx 1 root root 20480 Dec 16 10:40 ../
drwxrwxrwx 1 root root 20480 Dec  8 18:14 mysql_data/
drwxrwxrwx 1 root root     0 Dec  8 10:50 mysql_log/
DevOps mysql # chown -R mysql:mysql /base/MySQL/
DevOps mysql # ll /base/MySQL/
total 40
drwxrwxrwx 1 root root     0 Dec  8 18:13 ./
drwxrwxrwx 1 root root 20480 Dec 16 10:40 ../
drwxrwxrwx 1 root root 20480 Dec  8 18:14 mysql_data/
drwxrwxrwx 1 root root     0 Dec  8 10:50 mysql_log/

有问题吗?

1 个答案:

答案 0 :(得分:1)

由于ntfs格式的问题,ntfs没有genneic Permission,所以我们应该使用mask来定义这个,对于exm:

/dev/sda1      /base    ntfs defaults,utf8,uid=1000,gid=1000,dmask=022,fmask=133     0       0