LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-30-2019, 04:15 AM   #1
Tharayman
LQ Newbie
 
Registered: May 2019
Posts: 2

Rep: Reputation: Disabled
Not able to write to USB disk


At first I did not have ownership to it, I think maybe because it has a HFS filesystem.
Found out it was mounted to /dev/sdf2 and ran $sudo chown -R raymond /dev/sdf2
$ ls -ld /dev/sdf2
brw-rw---- 1 raymond disk 8, 82 mai 30 09:16 /dev/sdf2

So, looks like I am the owner now, but I still can not read or write!
What am I missing? Is there no way to change ownership outside of terminal?
 
Old 05-30-2019, 04:30 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,218

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Hi,

/dev/sdf2 is not where it is mounted, it is the location of the device. I'm assuming you want to copy files to it or something. In that case you need to mount it. eg
Code:
mount -t hfs /dev/sdf2 /mnt
cp myfile.txt /mnt/
sync
umount /mnt
Evo2.
 
1 members found this post helpful.
Old 05-30-2019, 07:50 AM   #3
Tharayman
LQ Newbie
 
Registered: May 2019
Posts: 2

Original Poster
Rep: Reputation: Disabled
Right!

Turn out it is mounted to /media/raymond/High sierra patcher so using your mount command does not work.
but I guess that is not a valid directory? High sierra patcher is the name of the stick.
 
Old 05-30-2019, 11:24 AM   #4
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 5,860

Rep: Reputation: 2166Reputation: 2166Reputation: 2166Reputation: 2166Reputation: 2166Reputation: 2166Reputation: 2166Reputation: 2166Reputation: 2166Reputation: 2166Reputation: 2166
That's quite natural. If the device is labeled, then the label name will be used by mount: I had one which automounted as /media/Verbatim Store'nGo. You can stop that by creating a suitable directory in /media and a suitable entry in /etc/fstab. I use
/dev/sdb1 /media/usb auto rw,user,noauto,exec,noatime,nodiratime 0 0
Alternatively, use gparted to remove the label.

If you can read the device but can't write to it, it may have a corrupt filing system, so you'd need to unmount and use fsck to clean it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to enable a Hard Disk to read/write to a USB device but disable the USB device to read/write to the hard disk without user permission? ce309 Linux - General 33 05-22-2019 05:30 PM
slackware64 14.1: not able to install LILO to MBR; not able to boot from USB drive. dcsst28 Slackware 1 11-17-2013 10:03 PM
read/write,write/write lock with smbclient fails swatidas11 Linux - Networking 1 03-10-2010 01:27 PM
not able to run php cammand. Not able to find php novinjaiswal Linux - Newbie 4 10-31-2008 02:28 PM
how to make my account on proftpd to be able to see all dirs and able to write. Mouse_103 Linux - Newbie 2 04-02-2003 08:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration