1

I have an external USB 3.0 disk which I mount as:

sudo mount -t ntfs -o rw,auto,user,umask=003,o+r,gid=science /dev/sda1 /media/external

There are 2 problems, which I am not sure how to solve:

1: When I do touch test, the file is by default executable.

2: The file is owned by root rather than the user.

What I am trying to do is achieve a setting where the user and groups have unfettered access to the drive (including setting permissions) and others can only reads the files and list directory contents. Also, files should not be marked as executable by default.

Luca
  • 155
  • 1
  • 7
  • 1
    The following link can help you modify the ownership and/or permissions: [Mount NTFS partition in a USB drive with custom permissions and owner](https://askubuntu.com/questions/11840/how-do-i-use-chmod-on-an-ntfs-or-fat32-partition/956072#956072) – sudodus Oct 14 '21 at 08:45
  • If you want a more detailed control of the ownership and/or permissions, I suggest that you use a Linux file system, for example `ext4`, which is the standard file system of Ubuntu. But Windows refuses to read it, so if that is necessary you may try `udf`, which has other problems (lack of active support but may work for you). See [this link](https://askubuntu.com/questions/952673/how-do-i-copy-a-file-larger-than-4gb-to-a-usb-flash-drive/952706#952706); scroll down to read about `udf` and the package `udftools`. – sudodus Oct 14 '21 at 08:57
  • 1
    Does this answer your question? [How do I use 'chmod' on an NTFS (or FAT32) partition?](https://askubuntu.com/questions/11840/how-do-i-use-chmod-on-an-ntfs-or-fat32-partition) – vanadium Oct 14 '21 at 09:27
  • @vanadium There is another thing...that all files are owned by `root` rather than the user which created them. – Luca Oct 14 '21 at 09:48
  • @Luca, is it an option for you to use a Linux file system, or must the filesystem work with Windows? – sudodus Oct 14 '21 at 10:37
  • That is what the `uid` option determines in the link provided. Study the ntfs mount options to set it up like you want. – vanadium Oct 14 '21 at 10:38

0 Answers0