Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


I need to edit a file which is read only, and its parent folder is also read only. This file is located at a remote appliance. Through ssh I logged in to this as admin and I have the root access.

Command "ls -l" show the permissions of file as

"-rwxr-xr-x 1 admin root   952 Oct 30 02:01"

and for folder

drwxr-xr-x 3 admin root

I am not as such familiar with Linux but I searched and found that these above lines mean that the admin is the owner and he/she has the read and write permission.

Someone suggested to remount the folder which contains this file.


How will I remount it, I used

mount -o remount,rw /folde1/folder2/targetFolder

but It gave

mount: can't find /folde1/folder2/targetFolder in /etc/fstab or /etc/mtab

I looked at question How do I remount a filesystem as read/write?, but I did not understand the answer...

It said correct syntax is

sudo mount -o remount,rw /partition/identifier /mount/point

What should I give as /partition/identifier and /mount/point? I.e. what is this /partition/identifier and /mount/point?

share|improve this question
Partition identifier = the UUID or the device identifier, you can get this information for a particular partition by entering sudo blkid in your terminal. Mount point is the location where you'd like the partition to be mounted, usually /media or /mnt, you'll have to create a folder there and the location of that folder becomes the mount point. – Nitin Venkatesh Nov 6 '12 at 18:50
up vote 4 down vote accepted

Problem is solved, I remounted folder by using "mount -o remount,rw /" and then edited the file, without changing any permissions, it worked.

share|improve this answer

You don't need to remount anything. You must to change permissions. You can do it with this command:

sudo chmod 777

This give all permisions to file, if you wish leave as read only for group and for rest of users you can do:

sudo chmod 644


sudo chmod 755

The first is for read-only, end the second for read and execute.

share|improve this answer
Thanks! :) I tried to change permissions but it was not working so someone told me to remount the folder. Problem is solved now, I used "mount -o remount,rw /", which remounted the folder and I edited the file, without changing permissions. – blackfyre Nov 6 '12 at 12:09
@user1204089 accept the answer so others doesn't have to try and solve it. Thanks! – Alvar Nov 6 '12 at 15:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.