Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an external hard drive mounted in arch-linux using /etc/fstab:

dev/sda1       /mnt/share      ntfs-3g user,users,gid=users,fmask=113,dmask=002,locale=en_US.UTF-8 0 0


charles@arch ~ $ ls -l /mnt/share
total 13
drwxrwxr-x 1 root users 4096 Jan  5 03:20 Audio
drwxrwxr-x 1 root users 4096 Jan  5 09:07 Photos
drwxrwxr-x 1 root users    0 Jan  4 10:58 $RECYCLE.BIN
drwxrwxr-x 1 root users 4096 Jan  5 09:21 Videos

All directores are owned by root:users and I can't change ownership, nor create a subdirectory with different ownership (as it's ntfs).

Let's suppuse the hard disk has subdirectories hdd_subdir_1 and hdd_subdir_2, both top-level. In addition, I have root user and unpriv, a completely unproviliged user on linux.

I wish to mount the device with 2 mountpoints:

  1. /mnt/share/subdir_1 as mount point as above, pointing to hdd_subdir_1 on device;
  2. /mnt/share/subdir_2 as mount point, where /mnt/share/subdir2 is owned by unpriv:unpriv, pointing to hdd_subdir_2 on device.

So 2 different default privileges, 2 mount points, 1 device. How do I do this? If not for the different privileges, I'd just set up symlinks or use mount -bind. But I can't make it work for the use case above. Thanks!

share|improve this question
    
Try mounting your ntfs partiton with the permissions option. users,permissions,locale=en_US.UTF-8 You can then chown/chmod the direcotires. –  bodhi.zazen Jan 7 at 19:20
    
@bodhi.zazen: This does not work; the behavior is the same. I can only mkdir as root and cannot change ownership in /mnt/share. –  Charles Pehlivanian Jan 7 at 20:50
    
OK, then you will have to use ext4 (or other linux native) –  bodhi.zazen Jan 7 at 20:52
    
I need to share it with Windows, so I can't use ext4. –  Charles Pehlivanian Jan 7 at 21:04
    
use one of the windows drivers - howtogeek.com/112888/… or make more then one partition on the device. –  bodhi.zazen Jan 7 at 21:42

1 Answer 1

up vote 0 down vote accepted

I am able to accomplish the setup above now, by a combination of local settings and /etc/fstab settings.

share|improve this answer
    
I have a similar problem, so it would be nice to see more details about how you achieved it. –  wilbo Feb 22 at 22:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.