LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 02-01-2018, 01:24 PM   #1
bkelly
Member
 
Registered: Jan 2008
Distribution: Centos 7-4
Posts: 187

Rep: Reputation: 13
scp claims destination is read only


Need to use scp to copy files from a laptop to an embedded system via an Ethernet connection. Both are running Ubuntu release 14.
From the workstation enter:

Code:
scp config.json.original root@192.168.1.20:/home/root/config.json.original
The response is
Code:
scp: /home/root/config.json.original: read-only file system
Use
Code:
ssh root@192.168.1.20
to log in to the embedded system and go to directory / and issue:
Code:
ls –al
There it shows for /home
Code:
drwxrwsrwx
cd to home, do ls again for root, and it shows
Code:
drwxrwxrwx
This newbie interprets that as stating that the file system where I am trying to write is NOT read only. What might I change to resolve this and be able to write to the embedded system?

Last edited by bkelly; 02-01-2018 at 01:37 PM.
 
Old 02-01-2018, 01:32 PM   #2
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.6
Posts: 3,646

Rep: Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209Reputation: 1209
That you can read/list files on a drive does not answer the question of whether or not its read-only.
Attempt to touch a new file while ssh'd in and let us know what happens, please.
 
Old 02-01-2018, 01:38 PM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 21,828

Rep: Reputation: 5783Reputation: 5783Reputation: 5783Reputation: 5783Reputation: 5783Reputation: 5783Reputation: 5783Reputation: 5783Reputation: 5783Reputation: 5783Reputation: 5783
Quote:
Originally Posted by bkelly View Post
Need to use scp to copy files from a laptop to an embedded system via an Ethernet connection. Both are running Ubuntu release 14.
From the workstation enter:
Code:
scp config.json.original root@192.168.1.20:/home/root/config.json.original
The response is
Code:
scp: /home/root/config.json.original: read-only file system
Use
Code:
ssh root@192.168.1.20
to log in to the embedded system and go to directory / and issue:
Code:
ls ľal
There it shows for /home
Code:
drwxrwsrwx
cd to home and do ls again and for root it shows
Code:
drwxrwxrwx
This newbie interprets that as stating that the file system where I am trying to write is NOT read only. What might I change to resolve this and be able to write to the embedded system?
You are 50% right; the DIRECTORY tree is read/write....but that is not the filesystem. On the embedded system, type in (as root) "mount", and you should see lines similar to this:
Code:
/dev/sda1 on /home type btrfs (rw,relatime,ssd,space_cache,subvolid=257,subvol=/@)
I have bolded a couple of characters in the line; the "rw" indicates that it is mounted as read/write. Read-only will have "ro" there. Your only choice at that point would be to modify the fstab file in /etc (from maintenance mode) and change the /home partition to mount as read-write. Read the man page on fstab for options.
 
1 members found this post helpful.
Old 02-02-2018, 05:18 AM   #4
giis
Member
 
Registered: Nov 2013
Location: Third Rock from Moon
Distribution: RPM/DEB based and LFS
Posts: 73

Rep: Reputation: Disabled
I assume you have separate /home partition. Directory permission is not enough, if you have read-only device permission. Check the device permission with command like
Quote:
mount | grep ro,
It will list read-only fs. Then you can remount it as read-write with command

Quote:
mount -o remount,rw /path/to/mountpt
 
1 members found this post helpful.
Old 02-02-2018, 09:59 AM   #5
bkelly
Member
 
Registered: Jan 2008
Distribution: Centos 7-4
Posts: 187

Original Poster
Rep: Reputation: 13
As noted, the target device is an embedded system and I now understand that the entire system can be designated as read-only. Now i know how to check such concepts. In this case a reboot resolved the problems.
Thank you to each for the replies.
 
  


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
Create symbolic link to a FTP/SCP destination riahc3 Linux - Newbie 7 08-31-2012 04:15 AM
cannot upload data using scp, Read-only file system ufmale Linux - Newbie 3 08-26-2008 11:46 PM
scp from a linux behaving strange and fubar'ing permissions on destination bsd system rg.viza Linux - Security 3 07-07-2007 03:00 PM
The Destination disk is read-only. novkhan Linux - Newbie 8 11-21-2005 04:08 AM
The destination disk is read only royalewitcheez Linux - Newbie 9 11-02-2003 04:48 PM

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

All times are GMT -5. The time now is 05:17 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration