Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

[SOVED] USB drive is always mounted read only

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
5 posts • Page 1 of 1
Author
Message
jody
l33t
l33t
User avatar
Posts: 682
Joined: Tue Oct 16, 2007 12:50 pm
Location: Switzerland

[SOVED] USB drive is always mounted read only

  • Quote

Post by jody » Tue Nov 22, 2022 4:03 pm

When i plug in an usb drive, it is automatically mounted to /mnt/usb1, but with read access only:

Code: Select all

ls -l /mnt
total 4
dr-x------ 1 root root 4096 Oct  3 08:29 usb1
The mount command returns

Code: Select all

/dev/sdc1 on /home/jody/ttt type ntfs (ro,relatime,uid=0,gid=0,fmask=0177,dmask=077,nls=utf8,errors=continue,mft_zone_multiplier=1)
I tried to mount it manually with specify9ing read/write access:

Code: Select all

sudo mount -o rw /dev/sdc1 ~/usb
.
No error was returned but the drive was again only read-accessible by root.

It is not possible to change anything woth chmod or chown.

How can i mount an usb drive that is readable and writeable?
Last edited by jody on Wed Nov 23, 2022 8:25 am, edited 1 time in total.
Top
mike155
Advocate
Advocate
Posts: 4438
Joined: Fri Sep 17, 2010 11:33 pm
Location: Frankfurt, Germany

  • Quote

Post by mike155 » Tue Nov 22, 2022 4:23 pm

Please take a look at the output of demsg and at your system log / journal. There are probably messages which explain what's going on.

It seems to be a NTFS partition. Was the drive last mounted under Windows? Google search reveals several posts that indicate that NTFS partitions are mounted read-only under Linux if they were not safely removed under Windows or if Windows was not shut down in full mode (Shift key).

You could also try the "ntfs3" and "ntfs-3g" filesystems.
Top
jody
l33t
l33t
User avatar
Posts: 682
Joined: Tue Oct 16, 2007 12:50 pm
Location: Switzerland

  • Quote

Post by jody » Tue Nov 22, 2022 4:41 pm

dmesg indeed says

Code: Select all

[6680603.125549] ntfs: (device sdc1): load_system_files(): Volume is dirty.  Mounting read-only.  Run chkdsk and mount in Windows.
But i seem to have no chkdsk on my machine.

I mounted in it on a Windows system and ran quick format. Strangely enough the drive was not identified as removable - the context-sensitive menu for it showed no"eject" or "safely remove" or any such.
So i shut down the Windows computer and unplugged the drive. When i plugged into my gentoo ystem it was again mounted read only.
The entry in dmesg differs, though:

Code: Select all

[6683223.232398] ntfs: (device sdc1): load_system_files(): $LogFile is not clean.  Mounting read-only.  Mount in Windows.
Regarding the other filesystem i seem to have neither of them:

Code: Select all

jody@aim-frog ~ $ sudo mount -t ntfs3 /dev/sdc1 ~/ttt 
mount: /home/jody/ttt: unknown filesystem type 'ntfs3'.
jody@aim-frog ~ $ sudo mount -t ntfs3-g /dev/sdc1 ~/ttt 
mount: /home/jody/ttt: unknown filesystem type 'ntfs3-g'.
seem to have
Top
mike155
Advocate
Advocate
Posts: 4438
Joined: Fri Sep 17, 2010 11:33 pm
Location: Frankfurt, Germany

  • Quote

Post by mike155 » Tue Nov 22, 2022 5:04 pm

Please redo the test, but perform a full shutdown under Windows. See: https://www.howtogeek.com/349114/shutti ... g-it-does/.

For ntfs-3g, FUSE must be enabled in your kernel and package sys-fs/ntfs3g must be installed.

For ntfs, the kernel options below must be enabled in your kernel:

Code: Select all

File systems > DOS/FAT/EXFAT/NT Filesystems

    [*] NTFS file system support
    [ ]   NTFS debugging support (NEW)
    [*]   NTFS write support (NEW)
For ntfs3, the kernel options below must be enabled in your kernel:

Code: Select all

File systems > DOS/FAT/EXFAT/NT Filesystems

    [*] NTFS Read-Write file system support
    [ ]   64 bits per NTFS clusters (NEW)
    [ ]   activate support of external compressions lzx/xpress (NEW)
    [ ]   NTFS POSIX Access Control Lists (NEW)
Top
jody
l33t
l33t
User avatar
Posts: 682
Joined: Tue Oct 16, 2007 12:50 pm
Location: Switzerland

  • Quote

Post by jody » Wed Nov 23, 2022 8:24 am

I mounted the usb drive to my windows laptop, did a quick format, then did "restart", and unplugged the drive just at the beginning of the boot sequence.

Plugged it in to my gentoo computer it was now mounted rw:

Code: Select all

/dev/sdc1 on /mnt/usb1 type ntfs (rw,nodev,noexec,noatime,sync,dirsync,uid=0,gid=0,fmask=0177,dmask=077,nls=utf8,errors=continue,mft_zone_multiplier=1)
with access rights 700. I changed this to 744, but still it seems to impossible to write to the disk:

Code: Select all

jody@aim-frog ~ $ sudo touch /mnt/usb1/test1.txt
touch: cannot touch '/mnt/usb1/test1.txt': Permission denied
However after i emerged sys-fs/ntfs3g, i did

Code: Select all

sudo mount -t ntfs-3g /dev/sdc1 /home/jody/tt
and now the access rights are

Code: Select all

drwxrwxrwx  1 root root         4096 Nov 23 09:19  ttt
and i can actually write to the drive.
Thanks!
Top
Post Reply

5 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic