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

Forum rules
Before you post please read this
Post Reply
User avatar
chellrose
Level 1
Level 1
Posts: 22
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 chellrose on Tue Dec 18, 2018 8:42 am, edited 1 time in total.
User avatar
all41
Level 16
Level 16
Posts: 6570
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
Light travels faster than sound. That's why some people appear smart until you hear what they are saying.
You will seldom see a grey-beard wearing a tinfoil hat.
gm10
Level 20
Level 20
Posts: 10999
Joined: Thu Jun 21, 2018 5:11 pm

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 5
Level 5
Posts: 777
Joined: Fri Feb 02, 2018 9:56 pm
Location: Somewhere in the USA
Contact:

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
Level 20
Level 20
Posts: 10999
Joined: Thu Jun 21, 2018 5:11 pm

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 16
Level 16
Posts: 6570
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?
Light travels faster than sound. That's why some people appear smart until you hear what they are saying.
You will seldom see a grey-beard wearing a tinfoil hat.
ajgringo619
Level 8
Level 8
Posts: 2124
Joined: Thu Mar 01, 2018 8:36 pm
Location: San Diego, California, USA

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.
Mint 20 XFCE [kernel 5.4.0-54-generic]
Ryzen 7 2700X Eight-Core w/16 GB RAM
GTX 1070 w/8GB RAM [Folding]
GTX 1050Ti w/4GB RAM [Nvidia v455.38]
Image
User avatar
WharfRat
Level 21
Level 21
Posts: 13909
Joined: Thu Apr 07, 2011 8:15 pm

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
ImageImage
User avatar
all41
Level 16
Level 16
Posts: 6570
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?
Light travels faster than sound. That's why some people appear smart until you hear what they are saying.
You will seldom see a grey-beard wearing a tinfoil hat.
User avatar
WharfRat
Level 21
Level 21
Posts: 13909
Joined: Thu Apr 07, 2011 8:15 pm

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
ImageImage
User avatar
chellrose
Level 1
Level 1
Posts: 22
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!
Post Reply

Return to “Mounting Partitions”