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 10-13-2015, 10:35 PM   #1
horwoodabitibi
LQ Newbie
 
Registered: Sep 2012
Location: Timmins Ontario
Posts: 13

Rep: Reputation: Disabled
Mount in read only


When I try mounting a USB memory stick to a new folder, I get the notice that it will be mounted in read only. If I try to chmod it to writable I get the permission denied notice. It makes no difference is I make the folder where this USB stick is to be mounted drwxrwxr-x and the files in that folder the same.
Thank you
 
Old 10-13-2015, 11:21 PM   #2
cykodrone
Member
 
Registered: Apr 2014
Location: My comp chair
Distribution: PCLinuxOS, Devuan
Posts: 87

Rep: Reputation: 19
Most people use FAT so a USB stick is cross-compatible with multiple operating systems (proprietary or not). You may have to move the data off the stick (copy, back it up), format the stick, then move the data back on to it. If you still have problems after that, then you are doing something wrong, possibly your user is not set to access some external data sources (optical media, etc), you may want to check in to that too. You didn't give much detail so I had to cover everything I could think of.

Edit: Have you tried opening the 'USB folder' as root? Possibly start your file manager as root, then see how it behaves. Just another suggestion.

Last edited by cykodrone; 10-13-2015 at 11:28 PM.
 
Old 10-14-2015, 06:05 AM   #3
horwoodabitibi
LQ Newbie
 
Registered: Sep 2012
Location: Timmins Ontario
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by cykodrone View Post
Most people use FAT so a USB stick is cross-compatible with multiple operating systems (proprietary or not). You may have to move the data off the stick (copy, back it up), format the stick, then move the data back on to it. If you still have problems after that, then you are doing something wrong, possibly your user is not set to access some external data sources (optical media, etc), you may want to check in to that too. You didn't give much detail so I had to cover everything I could think of.

Edit: Have you tried opening the 'USB folder' as root? Possibly start your file manager as root, then see how it behaves. Just another suggestion.
I can sudo write new file to the stick but I cannot see any of the files that were on the stick before I mounted it. That is really what I want to see. When I umount the stick and look at the property on a Window machine, I see that the file system is Fat32. Is this a problem? You mention most people use FAT. Is Fat32 the same? I am very new to all this. I am working from the command line and do not have access to GUI. I am running Raspian on a Raspberry pi. What else would you like to know. Please tell me if I am in the wrong Forum.
Thank you
 
Old 10-14-2015, 06:41 AM   #4
cykodrone
Member
 
Registered: Apr 2014
Location: My comp chair
Distribution: PCLinuxOS, Devuan
Posts: 87

Rep: Reputation: 19
No no, you are in the right place, but your latest post provides much more information and a new can of worms, lol. The command line is relatively the same no matter what hardware or distro you use. FAT32 is the common file system for USB sticks, but I don't believe is supports permission bits (with the exception of pre-set attribute files like read-only and locked). What it looks like you need to do is learn the proper/exact command line string to mount the stick, then learn the command to browse the files page by page in the CL. You may also might want to try changing the attributes (if any) in Windows and then try again. Read only just prevents files from being altered, accidentally or maliciously.

I would love to help you with the CL file browsing commands but everybody's setup is different, for that you might want to talk to the same distro users/Raspian users.

Linux file systems and NTFS, etc, support USER permission bits. I have a storage drive that is purposely NTFS in case I have to read it from a Windows machine in an emergency (there is no Windows in my house except the glass ones that keep out the weather, lol), the two distros I run on the same machine have different default user numbers (one is 500 and the other is 1000), so I purposely have the fstab file (file system table) in both distros auto-mount the storage drive as rwrwrw (no restrictions for anybody, this is my choice, I am not recommending it). So if I want to swap a file between the distros, I just copy it to that storage drive from the booted distro, boot in to the other distro and use the file without any user 500/1000 issues. I'm getting carried away, just trying to give you an idea how permissions work and how strict and finicky operating systems can be with them.

Edited for a spelling error.

Last edited by cykodrone; 10-14-2015 at 11:33 AM.
 
Old 10-14-2015, 07:34 AM   #5
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
What exactly is the message you get, is there any info why it is mounted ro?
 
Old 10-14-2015, 08:23 AM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Moved: This thread is more suitable in <Linux - Newbie> and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 10-14-2015, 11:13 AM   #7
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,487

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
Since you have a windows filesystem (FAT32) on the drive, can you see the files you want when you boot into windows?
What was on the stick before, was it just data files/directories?
 
Old 10-14-2015, 06:23 PM   #8
horwoodabitibi
LQ Newbie
 
Registered: Sep 2012
Location: Timmins Ontario
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Emerson View Post
What exactly is the message you get, is there any info why it is mounted ro?
mount: warning: /mnt/usbstick seems to be mounted read-only When I try cd into the usbstick directory, I get -bash: cd: usbstick: permission denied.
Thank you
 
Old 10-14-2015, 06:27 PM   #9
horwoodabitibi
LQ Newbie
 
Registered: Sep 2012
Location: Timmins Ontario
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
Since you have a windows filesystem (FAT32) on the drive, can you see the files you want when you boot into windows?
What was on the stick before, was it just data files/directories?
Yes I can see the files on my window system. The files are mostly jpep pictures some in directories.
 
Old 10-14-2015, 07:46 PM   #10
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,487

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
Where is the mount point? If it is outside your /home/user directory, you need to mount as rooot (using sudo).
What is the exact command you use to mount it?
 
Old 10-15-2015, 09:20 AM   #11
horwoodabitibi
LQ Newbie
 
Registered: Sep 2012
Location: Timmins Ontario
Posts: 13

Original Poster
Rep: Reputation: Disabled
Where is the mount point? If it is outside your /home/user directory, you need to mount as rooot (using sudo).
What is the exact command you use to mount it?
Yesterday 07:27 PM

sudo mount /dev/sdb1 /mnt/usbstick
 
Old 10-15-2015, 09:39 AM   #12
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Try it with
Code:
sudo mount -o mode=1777 /dev/sdb1 /mnt/usbstick
This should give every user full read/write access.
 
  


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 change read-only mount to read-write ? zvivered Linux - Embedded & Single-board computer 4 12-02-2010 09:06 PM
/ LVM mounting read-only, how to mount read-write thllgo Linux - Server 2 11-10-2010 07:39 AM
mount: cannot mount block device ... read-only Krajisnik Linux - Newbie 4 07-15-2009 02:33 AM
Cant mount dvd writer and will only mount as read only. M$ISBS Linux - Newbie 7 11-06-2006 08:23 PM
kernel panic unable to mount root (yes ive read/read other posts) dmx9595 Linux - General 4 01-17-2004 05:07 AM

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

All times are GMT -5. The time now is 03:38 AM.

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