Page 1 of 1

<SOLVED> Mount NTFS partition with me (not root) as owner

Posted: Mon Dec 17, 2018 11:28 am
by chellrose
I have a NTFS partition that I use to access files from both Linux and Windows. During installation of Mint, in the partition editor, I set this partition to have a mount point of /home/chellrose/sharepart. Now the partition mounts beautifully upon startup... but with root as owner. I want to make chellrose the owner of this partition. How do I go about doing that? I've read that chown and the like don't work for NTFS, and Nemo won't allow me to edit the owner even if I run it as root.

Thanks.

Re: Mount NTFS partition with me (not root) as owner

Posted: Mon Dec 17, 2018 11:42 am
by all41
Try:

Code: Select all

sudo chown -R $USER:$USER /home/chellrose/sharepart

Re: Mount NTFS partition with me (not root) as owner

Posted: Mon Dec 17, 2018 11:52 am
by gm10
Find your user id by running

Code: Select all

id
then add your user id to the mount options.

Mint menu > Disks > select the partition > cogs icon > Edit Mount Options > add uid=1000 (using your id) to the one field that does not have a label for some reason - comma separated if something is already there. Re-mount or just re-boot for the change to take effect.

You can add your group id as well for good measure even though not strictly necessary on a single-user system ,gid=1000.

Re: Mount NTFS partition with me (not root) as owner

Posted: Mon Dec 17, 2018 12:00 pm
by HaveaMint
gm10 wrote:
Mon Dec 17, 2018 11:52 am
.
I found this in a search and don't know if it is safe or not. Can you comment on this?
Navigate to: and edit udisks2.conf
/etc/udisks2/udisks2.conf

Code: Select all


[udisks2]
# Comma separated list of modules to load.
# Use asterisk to load all the modules.
modules=*
# Valid options are 'ondemand' or 'onstartup'.
modules_load_preference=ondemand
SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", ENV{ID_BUS}=="usb", ENV{ID_FS_TYPE}=="vfat" MODE="0777"

Re: Mount NTFS partition with me (not root) as owner

Posted: Mon Dec 17, 2018 3:24 pm
by gm10
HaveaMint wrote:
Mon Dec 17, 2018 12:00 pm
I found this in a search and don't know if it is safe or not. Can you comment on this?
I don't see how this is related to the OP, so no, I don't think I can comment on that here. ;)

Re: Mount NTFS partition with me (not root) as owner

Posted: Mon Dec 17, 2018 11:58 pm
by all41
Is ownership of the mountpoint not sufficient?

Re: Mount NTFS partition with me (not root) as owner

Posted: Tue Dec 18, 2018 12:34 am
by ajgringo619
all41 wrote:
Mon Dec 17, 2018 11:58 pm
Is ownership of the mountpoint not sufficient?
Not with NTFS, no.

Re: Mount NTFS partition with me (not root) as owner

Posted: Tue Dec 18, 2018 12:47 am
by WharfRat
all41 wrote:
Mon Dec 17, 2018 11:58 pm
Is ownership of the mountpoint not sufficient?
You're not setting ownership of a mountpoint, but rather the filesystem

ntfs does not store file ownership or file mode bits so they are contrived globally at mount time with uid=value, gid=value and fmask=value, dmask=value

Re: Mount NTFS partition with me (not root) as owner

Posted: Tue Dec 18, 2018 1:02 am
by all41
I find this strange because on this system there is a hd with an NTFS partition containing Win7pro to which
I have full access r/w.
No ownership mitigations, nothing special to make this happen.
I've always considered Linux to have full access to NTFS. What is different here?

Re: Mount NTFS partition with me (not root) as owner

Posted: Tue Dec 18, 2018 1:14 am
by WharfRat
all41 wrote:
Tue Dec 18, 2018 1:02 am
I find this strange because on this system there is a hd with an NTFS partition containing Win7pro to which
I have full access r/w.
No ownership mitigations, nothing special to make this happen.
I've always considered Linux to have full access to NTFS. What is different here?
It could be because you're mounting it from the file manager which utilizes udisks

Re: Mount NTFS partition with me (not root) as owner

Posted: Tue Dec 18, 2018 8:41 am
by chellrose
all41 wrote:
Mon Dec 17, 2018 11:42 am

Code: Select all

sudo chown -R $USER:$USER /home/chellrose/sharepart
This didn't do anything. It seemed to be cranking away at something, but at the end of the process, owner was still root.
gm10 wrote:
Mon Dec 17, 2018 11:52 am
...

Mint menu > Disks > select the partition > cogs icon > Edit Mount Options > add uid=1000 (using your id) to the one field that does not have a label for some reason - comma separated if something is already there. Re-mount or just re-boot for the change to take effect.
This worked, thank you!