Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Cannot access NTFS formatted disk as user

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
djevil1
Posts: 12
Joined: 2018-04-10 10:53

Cannot access NTFS formatted disk as user

#1 Post by djevil1 »

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?

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1389
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 45 times
Been thanked: 66 times

Re: Cannot access NTFS formatted disk as user

#2 Post by None1975 »

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.
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

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

Re: Cannot access NTFS formatted disk as user

#3 Post by djevil1 »

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.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Cannot access NTFS formatted disk as user

#4 Post by p.H »

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.

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

Re: Cannot access NTFS formatted disk as user

#5 Post by djevil1 »

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

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Cannot access NTFS formatted disk as user

#6 Post by p.H »

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.

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

Re: Cannot access NTFS formatted disk as user

#7 Post by djevil1 »

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..

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Cannot access NTFS formatted disk as user

#8 Post by p.H »

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.

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

Re: Cannot access NTFS formatted disk as user

#9 Post by djevil1 »

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

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: Cannot access NTFS formatted disk as user

#10 Post by sunrat »

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!

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Cannot access NTFS formatted disk as user

#11 Post by p.H »

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

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: Cannot access NTFS formatted disk as user

#12 Post by sunrat »

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!

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

Re: Cannot access NTFS formatted disk as user

#13 Post by djevil1 »

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.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Cannot access NTFS formatted disk as user

#14 Post by p.H »

Did not help what ?
You submitted multiple (and probably unrelated) problems.

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

Re: Cannot access NTFS formatted disk as user

#15 Post by djevil1 »

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

Post Reply