LinuxQuestions.org
Help answer threads with 0 replies.
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 11-15-2016, 02:29 AM   #1
imraniol
LQ Newbie
 
Registered: Mar 2009
Location: Bangladesh
Posts: 1

Rep: Reputation: 0
how to get rid of "Read-only file system"


while create a directory or copy anything as root ,there always show "Read-only file system"
any suggestion ......................pls
 
Old 11-15-2016, 02:46 AM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,976

Rep: Reputation: 3181Reputation: 3181Reputation: 3181Reputation: 3181Reputation: 3181Reputation: 3181Reputation: 3181Reputation: 3181Reputation: 3181Reputation: 3181Reputation: 3181
You're not serious are you? Please provide a lot more information and a working example.
 
Old 11-15-2016, 02:47 AM   #3
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,081
Blog Entries: 23

Rep: Reputation: 4063Reputation: 4063Reputation: 4063Reputation: 4063Reputation: 4063Reputation: 4063Reputation: 4063Reputation: 4063Reputation: 4063Reputation: 4063Reputation: 4063
Welcome to LQ!

You have not supplied enough information for anyone to be able help you.

What version of Linux are you running?
Is it running from a harddrive, a DVD, a USB stick, etc.?
Are you logged in locally or remote?
What directory or device are you trying to write to?

Please review the Site Faq again for guidance on how to ask your questions.
 
Old 11-15-2016, 07:16 AM   #4
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,227

Rep: Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191
Quote:
Originally Posted by imraniol View Post
while create a directory or copy anything as root ,there always show "Read-only file system"
any suggestion ......................pls
Here I can help you,

GNU/Linux is GNU/Linux a UNIX base Operating System, and for this type of situation it does not matter what distro or version you have. Because this is basic system administration operations that you need to familiarize yourself with.


this is one way to take care of that, obviously you're creating as root, then trying to use as a user, if you do that as root or su or sudo and you want a user to be able to do more then read it, you have to then do,
Code:
chown user:group 'whatever you're changing ownership to goes here' -R
or change its permissions as root, or add the user to a group that if it is on the system side also has permissions to do other then just read.

what that command did was give the same permissions to the item you changed ownership to that the "new" owner has. his/her name and a group he or she belongs to.

if you are going to be creating new directories or files needed on the user side of the system. You do not have to create them as root user.

whatever user you're logged in as can create what ever directories or files he wants within his environment. they will have the same permissions as the creator.

that is likewise with everything, until such a time you change the permissions to anything by the use of what permissions the creator has to do so.

to over ride a user then you need to go into god mode to do so if you are not the creator of said item or items, or are preforming operations on the system side. ie. anything that resides on what is called the root partition.

if you need to create a file that is to be put onto the system side, you can still do this using your user permissions within the users environment. Then when you are done with whatever file or directory you are working on. (mostly done with files)

you then can use root user to move it onto the system side where ever it needs to be and its permissions will be changed to the root permissions automatically. Due to the ownership permissions relationship that preformed the operation.

Linux Users and Groups

Bangladesh = broken english

Last edited by BW-userx; 11-15-2016 at 08:37 AM.
 
Old 11-15-2016, 08:12 AM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,243
Blog Entries: 4

Rep: Reputation: 3776Reputation: 3776Reputation: 3776Reputation: 3776Reputation: 3776Reputation: 3776Reputation: 3776Reputation: 3776Reputation: 3776Reputation: 3776Reputation: 3776
There are two situations in which I commonly see this message:
  1. When Linux is started in "single-user mode" following a serious crash, and most filesystems are purposely mounted read-only ... so that you won't fsck things up when you're using fsck to figure out what happened.
  2. In a virtual machine or with an NFS share that has been purposely mounted in this way.

The message, "Read-only file system," means exactly what it says: that the entire file system corresponding to this mount-point prohibits all writing.

Also, notice that I referred to mounting. Unless the device is read-only, such as a CD-ROM, the read-only status is conferred when the device is mounted and can be changed by remounting it.

Last edited by sundialsvcs; 11-15-2016 at 08:13 AM.
 
Old 11-15-2016, 08:27 AM   #6
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693
As an example, a command to check for a readonly filesystem is:

Code:
[root@tools ~]# cat /proc/mounts | grep ro
rootfs / rootfs ro 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=32,pgrp=1,timeout=300,minproto=5,maxproto=5,direct 0 0
You will notice in this output the that root file system '/' is mounted as 'ro' which is 'read-only'. If you were to want to write to this filesystem, you would want it mounted in 'rw' mode which is 'read/write' mode.
 
Old 11-15-2016, 08:42 AM   #7
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,227

Rep: Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191Reputation: 2191
just sticking to the facts.

key words to point out a facts are,
while create a directory or copy anything as root,there always show "Read-only file system"
any suggestion

where would one find this situation?

as a user trying to write to a file or directory created as root user. even in his or her own home directory.

just saying,

Last edited by BW-userx; 11-15-2016 at 08:46 AM.
 
Old 11-15-2016, 08:55 AM   #8
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693
Just figured that he probably didn't list every single command or instance that causes it since the pattern is kind of obvious. Best wait for them to get back with a reply before we write out another 7 replies guessing what the issue is.
 
Old 11-18-2016, 12:38 AM   #9
Vernicronz
Member
 
Registered: Jul 2014
Distribution: Redhat,Centos,Ubuntu
Posts: 55

Rep: Reputation: Disabled
a reboot will help
 
  


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
dd, chmod usb external cause "Read-only file system" AmazingTrans Linux - Newbie 4 09-17-2013 03:43 PM
Failed to overwrite statefile "Read only file-system" Bviper Linux - Networking 5 01-05-2010 07:40 PM
Dual display and "read-only file system" in Hardy rgalaway Ubuntu 5 10-28-2008 01:00 AM
chmod command fails with "Read-only file system" huklBerry Linux - General 8 06-13-2008 03:35 PM
Can't boot Mandrake 10.0, "Cannot touch, Read-Only File System" RasutoIbuki Mandriva 5 07-23-2004 08:57 PM

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

All times are GMT -5. The time now is 02:56 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