- Linux Mint Forums
- [Solved] How to mount NTFS partitions?
- Re: How to mount partitions?
- Re: How to mount partitions?
- Re: How to mount partitions?
- Re: How to mount partitions?
- Re: [Solved] How to mount NTFS partitions?
- Re: [Solved] How to mount NTFS partitions?
- Re: [Solved] How to mount NTFS partitions?
- Re: [Solved] How to mount NTFS partitions?
- Re: [Solved] How to mount NTFS partitions?
- Re: [Solved] How to mount NTFS partitions?
- Linux mint and ntfs
- Полный доступ к NTFS из Linux
Linux Mint Forums
Forum rules
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.
[Solved] How to mount NTFS partitions?
Post by Erased » Tue Dec 20, 2016 3:11 am
I can just right click a partition and press Mount. But how do I do that in terminal?
I tried
sudo mkdir /media/zoran/Data
sudo mount -t auto -v /dev/sda6 /media/zoran/Data
but when I do this I have to enter a password when unmounting because it says the partition was mounted by another user, so I assume this is not the correct way.
What command should I be using instead?
I’m searching for this because I want to set it to run on startup.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
all41 Level 18
Posts: 8920 Joined: Tue Dec 31, 2013 9:12 am Location: Computer, Car, Cage
Re: How to mount partitions?
Post by all41 » Tue Dec 20, 2016 3:39 am
this part is correct—good.
If you want this to mount automatically at startup then you have to make an entry for it in etc/fstab.
Not really hard to do.
In a terminal run:
that will show the mounted partitions with their respective UUID designations.
Here is an example entry in etc/fstab for a partition on my second hard drive:
UUID=9f665aa7-1724-42f5-8209-15011de9080e /media/uno/archival ext4 defaults,noatime 0 2
The UUID is what you get from sudo blkid—after that you will see the mount point (mine is: /media/uno/archival) , then the file system type, the rest is fairly standard.
After entering this line in etc/fstab run:
this will verify your syntax that you just added to fstab—if it returns no errors you will be good to go. Reboot and the partition should be mounted
I will refer you to this thread:
viewtopic.php?f=46&t=154670#p802950
where I was tutored in this matter.
Best of luck your way and Merry Christmas
Re: How to mount partitions?
Post by Erased » Wed Dec 21, 2016 12:31 am
Cool, let me just run this by you.
/dev/sda4: LABEL="TI10664800H" UUID="BA26CF4D26CF08F9" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="c204b4eb-1a72-11e3-bafb-ceadba28250e" /dev/sda6: LABEL="Data" UUID="72AC4FFFAC4FBBFB" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="d190fc94-f80c-4b9e-615a-24cc8c223e0a"
# Windows partition on /dev/sda4 UUID=BA26CF4D26CF08F9 /media/zoran/TI10664800H ntfs defaults 0 2 # Common data partition on /dev/sda6 UUID=72AC4FFFAC4FBBFB /media/zoran/Data ntfs defaults 0 2
Re: How to mount partitions?
Post by WharfRat » Wed Dec 21, 2016 12:55 am
Since these are ntfs partitions, some other options will be helpful especially with permissions
Also if zoran is the user name then don’t create the mountpoints there, use /media/TI10664800H and /media/Data instead.
These are the entries you can use:
UUID=BA26CF4D26CF08F9 /media/TI10664800H ntfs-3g noatime,user,nls=utf8,windows_names,dmask=002,fmask=111,uid=1000,gid=1000 0 0 UUID=72AC4FFFAC4FBBFB /media/Data ntfs-3g noatime,user,nls=utf8,windows_names,dmask=002,fmask=111,uid=1000,gid=1000 0 0
Since ntfs partitions don’t store file mode bits and owner/groups etc. it has to be globally set with the fstab options. You can check man ntfs-3g for more information about this.
Re: How to mount partitions?
Post by Erased » Wed Dec 21, 2016 1:20 am
Re: [Solved] How to mount NTFS partitions?
Post by Erased » Thu Dec 22, 2016 6:49 pm
I use /mnt instead of /media
And after coding some stuff I realized I cannot run my apps anymore, since the source&project files (shared by win & linux) are all on the data partition.
I tried setting the options nouser,exec but that didn’t help, so I did umask=000
Is this ok?
Re: [Solved] How to mount NTFS partitions?
Post by WharfRat » Thu Dec 22, 2016 10:17 pm
If you mean the ntfs-3g umask fstab mount option then it will only affect the files on the windows partition so it’s fine.
Re: [Solved] How to mount NTFS partitions?
Post by Erased » Sun Dec 25, 2016 12:02 am
A few more questions..
Now that I’m mounting the windows partition how should I prevent access to specific system folders?
At least how should I prevent it without root?
Re: [Solved] How to mount NTFS partitions?
Post by WharfRat » Sun Dec 25, 2016 2:08 am
When mounting an ntfs partition, all folder options are controlled with dmask.
You can’t set individual folder permissions like you can on linux partition because there is no such permissions on an ntfs partition.
If you set dmask=077 then only the user will be able to access the folders.
Re: [Solved] How to mount NTFS partitions?
Post by Erased » Sun Dec 25, 2016 6:26 am
I guess I’ll just use umask=177 for now
It’s annoying that ntfs-3g driver doesn’t have a separate option for windows system files.
BTW why would you normally use different permissions for files and directories? I don’t see a reason for this.
Note to self: this is what the mask means http://askubuntu.com/a/429858
Re: [Solved] How to mount NTFS partitions?
Post by altair4 » Sun Dec 25, 2016 8:40 am
umask isn’t that hard to understand and it would appear that you are using it incorrectly.
All files and folders in an NTFS partition are born with permissions of 777. Read, Write, and execute to everyone and your Aunt Agnes. Umask represents the permissions that you want to remove .
So a umask of 000 removes nothing. A umask of 077 removes everthing from groups and others:
777 — Starting permissions
077 — umask value
===
700 — Resulting permissions. The ability of the owner to Read ( Octal value of 4 ), Write ( 2 ), and Execute ( 1 ). 4+2+1=7. But no access ( 0 ) to anyone else.
A umask of 177 doesn’t do what you want since the result will be:
777
177
===
600 — You will not be able to traverse the folder to read or write to it.
BTW why would you normally use different permissions for files and directories? I don’t see a reason for this.
Folders have to have the execute bit enabled or you will not be able to traverse them. A umask is indiscriminate and applies itself to both files and folders. You may not want all your files to be executable but you do want your folders to be so umask was split into a mask for files ( fmask ) and a mask for directories ( dmask ).
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Linux mint and ntfs
Добрый день!
Столкнулся с проблемой отсутствия возможности записи на NTFS. Вернее записать файл можно, но только из под root и через Double-Commander или MC, ну или через терминал. Dolphin отказывается даже из под root.
У меня 2 системы — Linux и Win7 и общий раздел с медиа.
ОС Linux mint KDE 18.1 64bit
Хелп!
BuTaJIuu , Привет!
1 — узнаем UUID требуемого раздела через sudo blkid
2 — добавляем строчку в /etc/fstab вида
UUID=1F7F76C938CF4113 /media/hardD ntfs-3g uid=1000,gid=1000,dmask=022,fmask=133,locale=ru_RU.UTF-8 0 0
/dev/sdb1: LABEL=»hardD» UUID=»1F7F76C938CF4113″ TYPE=»ntfs» PARTUUID=»1b7945d3-01″
/dev/sdb2: LABEL=»copy_home» UUID=»a937c366-4162-47aa-8032-8a132f203fb7″ TYPE=»ext4″ PARTUUID=»1b7945d3-02″
/dev/sda1: UUID=»e5de675e-6b6b-4ce9-8629-542d07732060″ TYPE=»ext4″ PARTUUID=»0e88d337-01″
/dev/sda2: UUID=»edf07ea4-bd06-42c3-9b9b-b7da414f377e» TYPE=»ext4″ PARTUUID=»0e88d337-02″
# /etc/fstab: static file system information.
#
# Use ‘blkid’ to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
#
# / was on /dev/sda1 during installation
UUID=e5de675e-6b6b-4ce9-8629-542d07732060 / ext4 errors=remount-ro 0 1
# /home was on /dev/sda2 during installation
UUID=edf07ea4-bd06-42c3-9b9b-b7da414f377e /home ext4 defaults 0 2
# /dev/sdb1: LABEL=»hardD» UUID=»1F7F76C938CF4113″ TYPE=»ntfs»
UUID=1F7F76C938CF4113 /media/hardD ntfs-3g uid=1000,gid=1000,dmask=022,fmask=133,locale=ru_RU.UTF-8 0 0
# Binds
/media/hardD/dja/Documents /home/dja/Документы none bind 0 0
/media/hardD/dja/Music /home/dja/Музыка none bind 0 0
/media/hardD/dja/Downloads /home/dja/Загрузки none bind 0 0
/media/hardD/dja/Pictures /home/dja/Изображения none bind 0 0
/media/hardD/dja/clouds/MailRu /home/dja/Clouds/MailRu none bind 0 0
/media/hardD/dja/clouds/YaDisk /home/dja/Clouds/YaDisk none bind 0 0
# /media/hardD/dja/clouds/Gdrive /home/dja/Clouds/Gdrive none bind 0 0
/media/hardD/dja/Video /home/dja/Видео none bind 0 0
#tmpfs
tmpfs /tmp tmpfs defaults 0 0
tmpfs /home/dja/.cache tmpfs defaults 0 0
tmpfs /home/soul/.cache tmpfs defaults 0 0
Dja Сообщения: 6635 Зарегистрирован: 27 авг 2016, 20:03 Решено: 28 Откуда: Voskresensk Благодарил (а): 1188 раз Поблагодарили: 699 раз Контактная информация:
Полный доступ к NTFS из Linux
BuTaJIuu , Привет!
1 — узнаем UUID требуемого раздела через sudo blkid
2 — добавляем строчку в /etc/fstab вида
UUID=1F7F76C938CF4113 /media/hardD ntfs-3g uid=1000,gid=1000,dmask=022,fmask=133,locale=ru_RU.UTF-8 0 0
/dev/sdb1: LABEL=»hardD» UUID=»1F7F76C938CF4113″ TYPE=»ntfs» PARTUUID=»1b7945d3-01″
/dev/sdb2: LABEL=»copy_home» UUID=»a937c366-4162-47aa-8032-8a132f203fb7″ TYPE=»ext4″ PARTUUID=»1b7945d3-02″
/dev/sda1: UUID=»e5de675e-6b6b-4ce9-8629-542d07732060″ TYPE=»ext4″ PARTUUID=»0e88d337-01″
/dev/sda2: UUID=»edf07ea4-bd06-42c3-9b9b-b7da414f377e» TYPE=»ext4″ PARTUUID=»0e88d337-02″
# /etc/fstab: static file system information.
#
# Use ‘blkid’ to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
#
# / was on /dev/sda1 during installation
UUID=e5de675e-6b6b-4ce9-8629-542d07732060 / ext4 errors=remount-ro 0 1
# /home was on /dev/sda2 during installation
UUID=edf07ea4-bd06-42c3-9b9b-b7da414f377e /home ext4 defaults 0 2
# /dev/sdb1: LABEL=»hardD» UUID=»1F7F76C938CF4113″ TYPE=»ntfs»
UUID=1F7F76C938CF4113 /media/hardD ntfs-3g uid=1000,gid=1000,dmask=022,fmask=133,locale=ru_RU.UTF-8 0 0
# Binds
/media/hardD/dja/Documents /home/dja/Документы none bind 0 0
/media/hardD/dja/Music /home/dja/Музыка none bind 0 0
/media/hardD/dja/Downloads /home/dja/Загрузки none bind 0 0
/media/hardD/dja/Pictures /home/dja/Изображения none bind 0 0
/media/hardD/dja/clouds/MailRu /home/dja/Clouds/MailRu none bind 0 0
/media/hardD/dja/clouds/YaDisk /home/dja/Clouds/YaDisk none bind 0 0
# /media/hardD/dja/clouds/Gdrive /home/dja/Clouds/Gdrive none bind 0 0
/media/hardD/dja/Video /home/dja/Видео none bind 0 0
#tmpfs
tmpfs /tmp tmpfs defaults 0 0
tmpfs /home/dja/.cache tmpfs defaults 0 0
tmpfs /home/soul/.cache tmpfs defaults 0 0
Новичок? — ознакомься с правилами
и Панель форматирования
IRC-канал