Cannot access NTFS formatted disk as user

Kernels & Hardware, configuring network, installing services

Cannot access NTFS formatted disk as user

Postby djevil1 » 2018-04-10 11:07

Hi,

I am using udevil / devmon to mount my devices automatically on boot.

I have other NTFS disks that will be mounted accurately.

However this one disk is only accessible as root, even for reading.

There is no entry for this disk in fstab and I don't want to create entries manually as devmon wouldn't do it, too.

So what might be wrong with this disk / mountpoint?

ntfs-3g is already installed.

What would be the correct way to mount it automatically on boot?
djevil1
 
Posts: 12
Joined: 2018-04-10 10:53

Re: Cannot access NTFS formatted disk as user

Postby None1975 » 2018-04-10 11:52

djevil1 wrote:ntfs-3g is already installed.

If local ntfs filesystems aren't mounted writable, you may need to configure your system to mount ntfs with ntfs-3g (on some distros this is already done). For example:
Code: Select all
sudo ln -s /sbin/mount.ntfs-3g /sbin/mount.ntfs

# OR if mount.ntfs-3g is located in /usr/bin:
Code: Select all
sudo ln -s /usr/bin/mount.ntfs-3g /usr/bin/mount.ntfs

Source.
User avatar
None1975
 
Posts: 429
Joined: 2015-11-29 18:23
Location: Lithuania, Vilnius

Re: Cannot access NTFS formatted disk as user

Postby djevil1 » 2018-04-10 12:26

It's even not readable.

mount.ntfs-3g resides in /sbin/ on my system

These links already exist:
lrwxrwxrwx 1 root root 13 Nov 30 20:38 /sbin/mount.ntfs -> mount.ntfs-3g
lrwxrwxrwx 1 root root 12 Nov 30 20:38 /sbin/mount.ntfs-3g -> /bin/ntfs-3g
Last edited by djevil1 on 2018-04-10 13:21, edited 1 time in total.
djevil1
 
Posts: 12
Joined: 2018-04-10 10:53

Re: Cannot access NTFS formatted disk as user

Postby p.H » 2018-04-10 12:59

Check the permissions of the mount point while the filesystem is mounted. Permissions of the bare mountpoint are irrelevant.

NTFS does not support native Unix permissions. Volatile permissions are defined at mount time with mount options such as uid, gid and umask.
According to the ntfs-3g(8) man page, the default value of umask is 0 which means full access to everybody.
p.H
 
Posts: 373
Joined: 2017-09-17 07:12

Re: Cannot access NTFS formatted disk as user

Postby djevil1 » 2018-04-10 13:16

The related disk / partition does not show up with:

sudo cat /proc/mounts | grep sdb
mount -l

sudo ls -al /dev/sdb2

is:
brw-rw---- 1 root disk 8, 18 Apr 10 12:33 /dev/sdb2
djevil1
 
Posts: 12
Joined: 2018-04-10 10:53

Re: Cannot access NTFS formatted disk as user

Postby p.H » 2018-04-10 13:38

djevil1 wrote:The related disk / partition does not show up with /proc/mounts / mount

Then the filesystem is not mounted.

djevil1 wrote:brw-rw---- 1 root disk 8, 18 Apr 10 12:33 /dev/sdb2

The permissions on the block device special file are irrelevant.
p.H
 
Posts: 373
Joined: 2017-09-17 07:12

Re: Cannot access NTFS formatted disk as user

Postby djevil1 » 2018-04-10 13:58

Hm, ok,
Now I tried this:

Code: Select all
xs ~/Documents/: sudo mount -t ntfs-3g /dev/sdb2 /media/ntfs   
False
The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Falling back to read-only mount because the NTFS partition is in an
unsafe state. Please resume and shutdown Windows fully (no hibernation
or fast restarting.)


Code: Select all
xs ~/Documents/: sudo ntfsfix /dev/sdb         
True
Mounting volume... NTFS signature is missing.
FAILED
Attempting to correct errors... NTFS signature is missing.
FAILED
Failed to startup volume: Invalid argument
NTFS signature is missing.
Trying the alternate boot sector
Unrecoverable error
Volume is corrupt. You should run chkdsk.


Will try to fix this with a Windows system..
djevil1
 
Posts: 12
Joined: 2018-04-10 10:53

Re: Cannot access NTFS formatted disk as user

Postby p.H » 2018-04-10 14:05

If the filesystem is in a partition (sdb2), you must check/fix the partition, not the whole disk (sdb).

PS : you do not have to specify "-t ntfs-3g". The type is automatically detected as ntfs, and mount.ntfs is an alias to ntfs-3g, so mount will use ntfs-3g by default.
p.H
 
Posts: 373
Joined: 2017-09-17 07:12

Re: Cannot access NTFS formatted disk as user

Postby djevil1 » 2018-04-10 16:57

sudo mount /dev/sdb4 /media/ntfs


Yes, really, that works! ( curiously)

But it will be still not mounted automatically by udevil/devmon,
would be nice to fix that, too.

Regards djevil
djevil1
 
Posts: 12
Joined: 2018-04-10 10:53

Re: Cannot access NTFS formatted disk as user

Postby sunrat » 2018-04-10 22:03

djevil1 wrote:
Code: Select all
xs ~/Documents/: sudo mount -t ntfs-3g /dev/sdb2 /media/ntfs   
False
The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Falling back to read-only mount because the NTFS partition is in an
unsafe state. Please resume and shutdown Windows fully (no hibernation
or fast restarting.)

This message may appear if you have fastboot enabled in Windows. Disable fastboot.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2263
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: Cannot access NTFS formatted disk as user

Postby p.H » 2018-04-11 08:15

AFAIK "fast boot" is a BIOS/UEFI firmware option, not a Windows option. Windows 8+ has a "fast startup" option.
p.H
 
Posts: 373
Joined: 2017-09-17 07:12

Re: Cannot access NTFS formatted disk as user

Postby sunrat » 2018-04-11 11:01

p.H wrote:AFAIK "fast boot" is a BIOS/UEFI firmware option, not a Windows option. Windows 8+ has a "fast startup" option.

Yeah right. Disable fast startup in Windows.

Here's an explanation of "Windows fast startup" and an egregious example of confusion in terminology:
https://askubuntu.com/questions/452071/ ... al-booting
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2263
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: Cannot access NTFS formatted disk as user

Postby djevil1 » 2018-04-11 15:54

Yes, I disabled fast startup (and hibernation & ran chkdsk /f), rebooted into Windows, before rebooted into Linux.
Did not help...
Last edited by djevil1 on 2018-04-12 00:21, edited 1 time in total.
djevil1
 
Posts: 12
Joined: 2018-04-10 10:53

Re: Cannot access NTFS formatted disk as user

Postby p.H » 2018-04-11 18:00

Did not help what ?
You submitted multiple (and probably unrelated) problems.
p.H
 
Posts: 373
Joined: 2017-09-17 07:12

Re: Cannot access NTFS formatted disk as user

Postby djevil1 » 2018-04-12 00:17

@p.H
But it will be still not mounted automatically by udevil/devmon,
would be nice to fix that, too.
djevil1
 
Posts: 12
Joined: 2018-04-10 10:53


Return to System configuration

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable