Search code examples
linuxdevicemount

Restrict access on a mounted device (Linux)


The challenge is to allow access to only one directory on the mounted device for all users.

I have an external hard drive. I mount it using the command

sudo mount -o umask=0007,gid=0,uid=0 /dev/sdb1 /mnt/SAMSUNG/

I need to make one directory available for reading/writing to other users on this device. I cannot do this via sudo chmod 777 /mnt/SAMSUNG/my_directory, the command has no effect.

Is there some other way to do this? Maybe I'm doing something wrong?


Solution

  • When mounting the NTFS file system (/mnt/SAMSUNG/), there is no possibility of mounting a specific directory.