In Raspbian Jessie Lite v4.4.26-v7 (if you need this information at all) mounted HDD with HTFS but no rights to make changes in the /mnt/MediaServer directory

Settings file /etc/fstab :

 UUID="7E0E9A2B1E99DC29" /mnt/MediaServer ntfs rw,nls=utf8,gid=plugdev,umask=0002 0 0 

But when I try to change, I do not have enough rights (I execute under root and with sudo so that for sure):

 mkdir: cannot create directory 'test': Operation not permitted bash: text.txt: Permission denied 

And the output ls -Al (yes, with the rights everything is very bad):

 drwxrwxr-x 1 root plugdev 4.0K Nov 15 2014 .GoFlexData drwxrwxr-x 1 root plugdev 0 Nov 15 2014 .GoFlexData_minidlna drwxrwxr-x 1 root plugdev 0 Nov 15 2014 .GoFlexData_thumbs -rwxrwxr-x 1 root plugdev 822K Nov 15 2014 .Scanner.log drwxrwxr-x 1 root plugdev 0 Sep 4 18:48 .Trashes drwxrwxr-x 1 root plugdev 0 Nov 13 20:51 .fseventsd drwxrwxrwx 1 root plugdev 0 Oct 23 22:00 Cloud drwxrwxrwx 1 root plugdev 16K Nov 12 19:28 Music drwxrwxrwx 1 root plugdev 20K Nov 13 08:55 System Volume Information drwxrwxrwx 1 root plugdev 0 Oct 28 18:29 Ubuntu drwxrwxrwx 1 root plugdev 0 Nov 15 2014 logs drwxrwxrwx 1 root plugdev 0 Sep 24 08:42 msdownld.tmp drwxrwxrwx 1 root plugdev 4.0K Nov 13 10:15 ?????????????? 
  • one
    Try the fstab line from this answer: ru.stackoverflow.com/a/584280/191416 - don Rumata
  • @donRumata added this line, but the problem remains, maybe I am doing something wrong (remounted) UUID=7E0E9A2B1E99DC29 /mnt/MediaServer ntfs-3g pi,locale=ru_RU.UTF-8,nobootwait 0 0 - users
  • @donRumata did not install ntfs-3g , everything works with it - users
  • Carefully re-read my answer. I wrote there about /mnt and /media . And what pi ? 1 in 1 copy (well, except for uuid). - don Rumata
  • @donRumata yes your answer helped, the problem was in the ntfs-3g driver not preinstalled. - users

2 answers 2

If you, being in some directory X, are trying to create a subdirectory Y with the command:

 mkdir Y 

and get the message

 mkdir: cannot create directory 'Y': Operation not permitted 

This is because you do not have permission to write to the X directory. Those. You need to do the following:

 cd .. sudo chmod 0777 X 

After that you can create subdirectories in X.

By the way, as far as I remember, in fstab you need to specify the type of the file system ntfs-3g and not ntfs. Since the driver type ntfs does not provide writing to such a disk. And the system must have the ntfs-3g driver installed. Although it may not be necessary in modern versions of Linux ... I don’t know for sure!

  • In Raspbian Jessie Lite ntfs-3g not pre ntfs-3g installed and installed separately, and either I don’t understand something, but the answer is not about that, the problem is not the rights, but to install ntfs for ntfs-3g , and perhaps only reading. At the moment, the problem is solved. - users

I need to install ntfs-3g , for this I use the package manager apt :

 sudo apt install ntfs-3g 

Edit the /etc/fstab , first open it:

 sudo vi /etc/fstab 

Add line:

 UUID=7E0E9A2B1E99DC29 /mnt/MediaServer ntfs-3g pi,locale=ru_RU.UTF-8,nobootwait 0 0 

Then you need to remount the disk with NTFS:

 # Отмонтировать диск umount /mnt/MediaServer # Примонтирвовать mount -a 

I want to note that for ntfs access rights and the owner is registered in the /etc/fstab . I want to mention the answer ru.stackoverflow.com from the user @ don-rumata which helped a lot.