-2

I have mounted /dev/sdb2 to /base in /etc/fstab, like this:

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

then /base like this:

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

try to 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/

Is something wrong?

Kara
  • 6,115
  • 16
  • 50
  • 57
nova
  • 11
  • 2
  • What OS is that? If it's mac, it probably doesn't support writing to NTFS – imel96 Dec 16 '16 at 06:28
  • Linux DevOps 4.4.0-47-generic #68-Ubuntu SMP Wed Oct 26 19:39:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux – nova Dec 16 '16 at 06:39

1 Answers1

1

the issue due to ntfs format,ntfs have no genneic Permission,so we should use mask to define this,for exm:

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