NTFS-3G (Italiano)

From ArchWiki
Revision as of 11:01, 17 May 2008 by Psyco (Talk | contribs) (Iniziato a tradurre)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Template:I18n links start Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n links end

Con questa guida imparerete ad impostare l'accesso in lettura/scrittura ad una partizione NTFS usando ntfs-3g.


Installare ntfs-3g

Assicuratevi prima che il repository [extra] sia abilitato

# pacman -Sy ntfs-3g


Configurazione di base

Editare fstab

Editate il vostro /etc/fstab seguendo questo schema:

<partizione>  <punto di montaggio>  ntfs-3g  defaults,locale=<locale>  0 0

Per esempio:

/dev/sda1  /mnt/windows  ntfs-3g  defaults,locale=en_PH.utf8  0 0


Configurazione avanzata

Inanzitutto, non dovremo mettere l'opzione defaults qui, se vorremo avere un controllo piu approfondito su come la nostra partizione NTFS viene montata.

Editare fstab

Editate il vostro /etc/fstab seguendo questo schema:

<partizione>  <punto di montaggio>  ntfs-3g  <opzioni>  0 0

Per esempio:

/dev/sda1  /mnt/windows  ntfs-3g  users,noauto,uid=1000,gid=100,fmask=0113,dmask=0002,locale=en_PH.utf8  0 0
/dev/sda5  /mnt/backup   ntfs-3g  users,uid=1000,gid=100,fmask=0113,dmask=0002,locale=en_PH.utf8         0 0
  • Gli esempi sopra-riportati sono utili se vorrete:
  1. che la vostra partizione NTFS possa essere montata e smontata da qualsiasi utente.
  2. the user (uid=1000) and group (gid=100) to "own" everything in the partition and to have permissions -rw-rw-r-- (0664) for files and drwxrwxr-x (1775) for directories.
  3. to use the locale en_PH.utf8
  4. /dev/sda5 to be automatically mounted at boot but not /dev/sda1

Typical and very useful ntfs-3g options

  • users - allow anybody to (un)mount NTFS partitions provided that the ntfs-3g binary is set SUID root (Command: chmod u+s /bin/ntfs-3g). Take note that you have to use users instead of user.
  • noauto - do not automatically mount the partition at boot
  • uid - the decimal value of the owner of the files and directories in a particular NTFS partition
  • gid - the decimal value of the group of the files and directories in a particular NTFS partition
  • fmask - the octal value of the bitmask of the file permissions
  • dmask - the octal value of the bitmask of the directory permissions
  • locale - often required to make files with national characters visible

Bitmask Values

To easily know the bitmask value for a particular permission setting without doing any calculations, all you have to do is:

  1. Fire up a new shell session. Use whatever terminal emulator you like.
  2. Use the umask command to give you the octal representation of a particular permission setting.
    1. "Set" the file mode creation mask using umask. e.g.:
      $ umask ug=rw,o=r
      Take note that ug=rw,o=r is equivalent to -rw-rw-r-- or 0664.
    2. Get the octal equivalent by simply executing umask without any arguments.
      $ umask
      You should get this:
      0113
  • Consult the EXTENDED DESCRIPTION section of the chmod manpage for more info about the mode operand (string format of the new file mode creation mask).

Mounting the partition

# mount <partition>

or

# mount <mount point>

Examples:

# mount /dev/sda1
# mount /mnt/backup
  • You can (un)mount NTFS partitions as non-root when you follow the Advanced configuration section of this document.