?
Solved

Cannot Write To Text File In Ubuntu

Posted on 2010-01-13
14
Medium Priority
?
598 Views
Last Modified: 2013-11-15
I installed Ubuntu on a USB stick, how do I make syslinux.cfg writable? It is owned by root but "gksudo gedit syslinux.cfg" does not work.
0
Comment
Question by:Ajak
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 4
  • 2
14 Comments
 
LVL 7

Expert Comment

by:vikas_madhusudana
ID: 26301523
what does ti tell does it give any error
0
 

Author Comment

by:Ajak
ID: 26301657
I can open file & edit but cannot save, as I am not owner.
0
 
LVL 7

Expert Comment

by:vikas_madhusudana
ID: 26301665
did you try  su root  command and use vi editor
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 

Author Comment

by:Ajak
ID: 26301709
I'm back in Windows now, will try in a few hours.
0
 
LVL 10

Expert Comment

by:Martin_J_Parker
ID: 26301720
or
su root
or
su  <file's-owner>
and then use the command
chmod  a+w  file
The file should then be editable by all users.
0
 

Author Comment

by:Ajak
ID: 26306253
Here's what happens:

ubuntu@ubuntu:~$  su root
Password:

ubuntu@ubuntu:~$ su ubuntu
Password:

Where do I find the password? I think my username is ubuntu.

ubuntu@ubuntu:/cdrom$ sudo chmod a+w syslinux.cfg
chmod: changing permissions of `syslinux.cfg': Read-only file system

The file remains locked, root is the owner.
0
 
LVL 7

Expert Comment

by:vikas_madhusudana
ID: 26306308
0
 
LVL 10

Accepted Solution

by:
Martin_J_Parker earned 400 total points
ID: 26306358
Hang on, it said "read only file system"?  What directory is syslinux.cfg in?
What does the output of the "mount -a" command give you?
If your file system is mounted read-only then you definitely won't be able to write to files on it.
0
 

Author Comment

by:Ajak
ID: 26306685
I was never given a password, on the web they say leave it blank which seems to work, sometimes.

syslinux.cfg is in /cdrom which is sdb1 (boot partition of USB drive)

ubuntu@ubuntu:/cdrom$ mount -a
mount: only root can do that
ubuntu@ubuntu:/cdrom$ sudo mount -a
ubuntu@ubuntu:/cdrom$

It should be posssible to write, see here (5th post):

http://ubuntuforums.org/showthread.php?t=1378971
0
 
LVL 7

Assisted Solution

by:vikas_madhusudana
vikas_madhusudana earned 100 total points
ID: 26306740
you have to set it then

sudo passwd root

http://www.pendrivelinux.com/what-is-the-default-root-password/
0
 

Author Comment

by:Ajak
ID: 26309952
Reset passwords (both root & ubuntu):

ubuntu@ubuntu:/cdrom$ sudo passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
ubuntu@ubuntu:/cdrom$ su
Password:
root@ubuntu:/cdrom# chmod a+w syslinux.cfg
chmod: changing permissions of `syslinux.cfg': Read-only file system
root@ubuntu:/cdrom#

File still locked, vi & nano text editors are unusable. vi responds to right & left cursor keystroke commands but not up & down, cannot figure out how to make nano wrap text, need to use gedit. I have spent 1 day solid trying to edit 1 text file, incredible.
0
 

Author Comment

by:Ajak
ID: 26310934
Seems like I have a Read-only file system so I am not going to waste any more time on this. I'll install Ubuntu on a Hard Drive & see how that goes.
0
 

Author Comment

by:Ajak
ID: 26320267
Found this:

It is important to mention that Live Linux USB flash drives created with this tool (UNetbootin), do not currently utilize a persistence feature. The resulting USB Linux install will function just as it does from a CD. By default you will not be able to save and restore your changes.

http://www.pendrivelinux.com/using-unetbootin-to-create-a-live-usb-linux/
0
 

Author Comment

by:Ajak
ID: 26320924
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Users are often faced with high disk consumption without really knowing where the largest amount of data resides. Disk Usage Analyzer (aka Baobab) is is a graphical, menu-driven application to analyse disk usage in any Gnome environment and can e…
This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question