NTFS Disk on Ubuntu FileServer - User Rights/Set Up Permissions

Discussion in 'Installation/Configuration' started by danhansen@denmark, Sep 29, 2014.

  1. danhansen@denmark

    danhansen@denmark Member HowtoForge Supporter

    Hi,


    OS: Ubuntu Server 12.04.5
    Ubuntu RAID1 - 2x 2Tb WD disks (sdc/sdd) (Ubuntu Software RAID)
    Backup function using Rsync - 2x 1Tb WD disks (sda/sdc)
    Samba

    Info related:
    https://help.ubuntu.com/community/AutomaticallyMountPartitions


    Need some help with permissions & user rights.
    I've been building a FileServer with a backup function. Backup of the RAID content to 2 1Tb WD disks. 1 backupdisk is "EXT4" filesystem and the other is "NTFS" filesystem.
    I need some help making the right setup in "fstab". What I need to do is:

    1. System needs to be able to write backups to both backupdrives of course. NTFS & EXT4
    2. Need to be able to read files from the disk, either directly from a windows box or if installed in a windows box. This is only regarding the NTFS partition.
    3. All my systems (Linux) are setup as UTF8 US, because I don't want issues related to language etc. I've only setup my systems to use a .dk keyboard.

    How does the mount lines in "fstab" need to be? For both disks!? This is how long I got myself:
    Backupdisk1 - NTFS:
    <UUID> /media/backupdisk1 ntfs rw,user,auto,fmask=0177,dmask=0077,uid=1000 0 0
    <UUID> /media/backupdisk1 ntfs-3g defaults,windows_names,locale=en_US.utf8 0 0
    *<UUID> /media/media/backupdisk1 ntfs defaults,uid=1000,rw 0 0


    Backupdisk1 - EXT4:
    *<UUID> /media/backupdisk2 ext4 rw,user,exec 0 0

    * This is how disks are mounted right now


    Some important information I found:
    NTFS partition* | rw,auto,user,fmask=0111,dmask=0000 | rw,user,auto,fmask=0177,dmask=0077,uid=1000

    *If you want write access to your file system, you should set the filesystem type to 'ntfs-3g' instead of 'ntfs'. You may need to install the package 'ntfs-3g' for this to work, so make sure it is installed before you use ntfs-3g.
    **uid=1000 restricts access to the user created while installing Ubuntu. 1001 is the user created after that, and so forth. gid=# may be used with or in place of uid to grant access to a group. However, group and user enumeration is beyond the scope of this article.


    And this which say something about the "0 0" and/or "0 2" in the end of the line:
    "....one small point: At the end of the both lines with vfat and ntfs, you have 0 2. The fsck command is not reliable in Linux for those types of partitions, so you should change the final 2 to 0 instead (such as you already see for the lines with proc and swap)..."


    Related information & system output:
    Code:
    # locale
    LANG=en_US.UTF-8
    LANGUAGE=en_US:en
    LC_CTYPE="en_US.UTF-8"
    LC_NUMERIC="en_US.UTF-8"
    LC_TIME="en_US.UTF-8"
    LC_COLLATE="en_US.UTF-8"
    LC_MONETARY="en_US.UTF-8"
    LC_MESSAGES="en_US.UTF-8"
    LC_PAPER="en_US.UTF-8"
    LC_NAME="en_US.UTF-8"
    LC_ADDRESS="en_US.UTF-8"
    LC_TELEPHONE="en_US.UTF-8"
    LC_MEASUREMENT="en_US.UTF-8"
    LC_IDENTIFICATION="en_US.UTF-8"
    LC_ALL=
    Code:
    # locale -a
    C
    C.UTF-8
    en_AG
    en_AG.utf8
    en_AU.utf8
    en_BW.utf8
    en_CA.utf8
    en_DK.utf8
    en_GB.utf8
    en_HK.utf8
    en_IE.utf8
    en_IN
    en_IN.utf8
    en_NG
    en_NG.utf8
    en_NZ.utf8
    en_PH.utf8
    en_SG.utf8
    en_US.utf8
    en_ZA.utf8
    en_ZM
    en_ZM.utf8
    en_ZW.utf8
    POSIX

    Please notice:
    I asked this in another thread, but I think it's best to make a new thread since the other was about something else.
    If you've got suggestions to this FileServer w. Backup, please don't hesitate to let me know ;)


    .
     
    Last edited: Sep 29, 2014

Share This Page