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

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
chellrose
Level 1
Level 1
Posts: 24
Joined: Sat Mar 25, 2017 11:04 am

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

Post 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.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
all41
Level 19
Level 19
Posts: 9523
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

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

Post by all41 »

Try:

Code: Select all

sudo chown -R $USER:$USER /home/chellrose/sharepart
Everything in life was difficult before it became easy.
gm10

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

Post 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.
HaveaMint
Level 6
Level 6
Posts: 1085
Joined: Fri Feb 02, 2018 9:56 pm

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

Post 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"
"Tune for maximum Smoke and then read the Instructions".
gm10

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

Post 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. ;)
User avatar
all41
Level 19
Level 19
Posts: 9523
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

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

Post by all41 »

Is ownership of the mountpoint not sufficient?
Everything in life was difficult before it became easy.
ajgringo619

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

Post by ajgringo619 »

all41 wrote: Mon Dec 17, 2018 11:58 pm Is ownership of the mountpoint not sufficient?
Not with NTFS, no.
WharfRat

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

Post 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
User avatar
all41
Level 19
Level 19
Posts: 9523
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

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

Post 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?
Everything in life was difficult before it became easy.
WharfRat

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

Post 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
User avatar
chellrose
Level 1
Level 1
Posts: 24
Joined: Sat Mar 25, 2017 11:04 am

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

Post 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!
Locked

Return to “Storage”