Score:1

External drive: All created files are owned by root

ru flag

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.

sudodus avatar
jp flag
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 avatar
jp flag
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`.
vanadium avatar
cn flag
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)
Luca avatar
ru flag
@vanadium There is another thing...that all files are owned by `root` rather than the user which created them.
sudodus avatar
jp flag
@Luca, is it an option for you to use a Linux file system, or must the filesystem work with Windows?
vanadium avatar
cn flag
That is what the `uid` option determines in the link provided. Study the ntfs mount options to set it up like you want.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.