Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
10
rated 0 times [  10] [ 0]  / answers: 1 / hits: 48411  / 3 Years ago, sun, september 12, 2021, 1:49:36

Background:



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 file.sh"


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.



Problem:



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?


More From » mount

 Answers
2

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


[#34444] Monday, September 13, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
defendle

Total Points: 219
Total Questions: 131
Total Answers: 112

Location: Finland
Member since Sat, Nov 6, 2021
3 Years ago
;