+6 votes
1.4k views
in Linux by (6.1k points)
ı want to know how to Install ntfs-3g on linux can you help me please

2 Answers

+7 votes
by (12.8k points)
Make sure you have enabled [extra] repository: ntfs-3g 
Manual assembly 
 
There are two options for mounting NTFS partitions. Traditional:
# mount -t ntfs /dev/<tu-partición-NTFS> /{mnt,...}/<folder>

The second option is to call directly ntfs-3g:

# ntfs-3g /dev/<tu-partición-NTFS> /<mount-location>
Note: No need to specify the type of mount ntfs-3g. The default mount command /sbin/mount.ntfs used, which is a symbolic link to / bin / ntfs-3g once the ntfs-3g package installed.

 

Basic Configuration 
Edit fstab 
Edit your / etc / fstab file according to:
<partition>  <mount point>  ntfs  defaults  0 0

For example:

/dev/sda1  /mnt/windows  ntfs  defaults  0 0
Note: For versions of ntfs-3g equal or greater to 2009.1.1, it is not necessary to add the option locale = <locale> eg: defaults, locale = de_DE.utf8, so that the file names are displayed correctly.

 

advanced Settings 
Basically, we want to put here the defaults option because we want to have more control over how our NTFS partitions are mounted. 
Edit fstab 
Edit your / etc / fstab file according to:
<partition>  <mount point>  ntfs-3g  <options>  0 0

Examples:

/dev/sda1  /mnt/windows  ntfs-3g  users,noauto,gid=users,umask=0022  0 0
/dev/sda5  /mnt/backup   ntfs-3g  users,uid=1000,gid=users,umask=0022        0 0
  • The above examples are useful if you want: 
    your NTFS partitions are assembled and dismantled by any user belonging to the group (gid = users). 
    the user (uid = 1000) and group (gid = users) are the "owners" of everything in the partition and the permissions are rw-rw-r-- (0664) for files drwxrwxr -x (1775) for directories. 
    / dev / sda5 is mounted automatically at boot but / dev / sda1 not

 

Common and useful options ntfs-3g 
users 
allows everyone mountar and always remove the NTFS partition as ntfs-3g binary have permission to set the SUID root (Order: chmod u + s / bin / ntfs-3g). Realize that you have to use users instead of user. 
noauto 
not automatically mount the partition at boot 
uid 
the decimal value of owner of the files and directories on an NTFS partition in particular 
gid 
the decimal value of the group that owns the files and directories on an NTFS partition in particular. 
umask 
the octal value for the mask files and folders. More information about umask here 
fmask and dmask 
as umask, but to set permissions individually for files and folders.

 

 
+8 votes
by (12.8k points)
Mask values ​​(Bitmask) 
1-To easily find the mask value of a particular set of permissions without doing calculations, all you have to do is: 
Start a new shell session. Use the terminal emulator you prefer. 
2-Use the command umask for octal representation of a particular set of permissions.
    1. "Set" using mode mask umask for file creation. eg .:
      $ umask ug=rw,o=r
      Note that ug = rw, o = r is equivalent to rw-rw-r-- or 0664. 
      Get the octal umask simply running without any arguments.
    2. $ umask
      You should get this:
      0113
  • See the EXTENDED DESCRIPTION section of the man page for chmod for more information on the operating mode (string format mask so the new file creation). 
    Damaged NTFS file systems 
    If an NTFS file system has errors, ntfs-3g mount it with read only. To fix the problem you need to run Windows and the program to fix disk errors. 
    To correct the file system, we need mount the device. For example, if the NTFS partition with errors is in / dev / sda2:
# umount /dev/sda2
# ntfsfix /dev/sda2
Mounting volume... OK
Processing of $MFT and $MFTMirr completed successfully.
NTFS volume version is 3.1.
NTFS partition /dev/sda2 was processed successfully.
# mount /dev/sda2
If everything went well, the volume will have write permissions. 
Mount the partition 
This section can be used to mount your NTFS partitions and test if everything went well. If you've added everything in / etc / fstab will be automatically mounted whenever the system boots.
# mount <partition>

or

# mount <mount point>

examples

# mount /dev/sda1
# mount /mnt/backup
  • You can mount and unmount NTFS partitions as normal user if you follow the Advanced Settings section of this document. 
    Assembly fault 
    If you can not mount the NTFS partition with the steps followed in this guide, try adding the UUID section in fstab for NTFS partitions. 
    example:
UUID=El_UUID_Correspondiente  /mnt/windows  ntfs-3g  noauto,gid=users,umask=0022  0 0

 

Mounting partitions using HAL 
HAL can mount your NTFS partitions automatically connected via hotplugging or hot. Create a custom HAL and add the group policy for storage writable.
Ask a Question
Welcome to WikiTechSolutions where you can ask questions and receive answers from other members of the community.

You can ask a question without registration.

Categories

...