Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
12-07-2016, 05:52 AM
|
#1
|
LQ Newbie
Registered: Dec 2016
Posts: 5
Rep:
|
How to make Folder/file writable other than /var folder in Linux based router
Hi,
I am working on Linux based router which runs Boa webserver.
Currently i am able add/delete files under /var folder.
other folders(/home,/lib,/proc etc..) are read only.
i need to make a folder under /home writable so that i can add files through Server if any changes are made.
i have tried chmod,chown , but didnt work out
i tried using mount
~$mount --bind /home/httpd/web/temp /var
i was able to mount temp files under /var folder but it is still in read only mode.i couldnt edit any file in temp
my requirement is ,i have few (.asp ) files inside temp folder which may change in future,
suppose if this folder is writable i could upload edited files using ftp server(rather than uploading entire image into router).
Please pour in your suggestions.
I have access to my Toolchain,SDK,bootloader.
Thanks in Advance,
Satish
Last edited by nlsatish26; 12-07-2016 at 11:22 PM.
|
|
|
12-07-2016, 08:13 AM
|
#2
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,189
|
Quote:
Originally Posted by nlsatish26
Hi,
I am working on Linux based router which runs Boa webserver. Currently i am able add/delete files under /var folder. other folders(/home,/lib,/proc etc..) are read only.
i need to make a folder under /home writable so that i can add files through Server if any changes are made. i have tried chmod,chown , but didnt work out i tried using mount
~$mount --bind /home/httpd/web/temp /var
i was able to mount temp files under /var folder but it is still in read only mode.i couldnt edit any file in temp my requirement is ,i have few (.asp ) files inside temp folder which may change in future, suppose if this folder is writable i could upload edited files using ftp server(rather than uploading entire image into router). Please pour in your suggestions. I have access to my Toolchain,SDK,bootloader.
|
The first suggestion I'd make, would be for you to read the "Question Guidelines" link in my posting signature. You're giving us no useful details about your situation. You haven't told us what kind of router (only that it's "Linux based"), running what kind of Linux. You say you tried chmod/chown, but go on to say only that it "didnt work".
Without actual error(s)/message(s), and details about your system, there's nothing we can really tell you. Where are you putting that mount command, too??
|
|
|
12-07-2016, 11:33 PM
|
#3
|
LQ Newbie
Registered: Dec 2016
Posts: 5
Original Poster
Rep:
|
Thank you very much for your quick reply
I am very sorry for providing less details.
I am new to forums.
Router Details:
--Home based router
# uname -a
Linux (none) 2.6.30.9 #2867 Thu Dec 8 10:32:12 IST 2016 [luna SDK V1.5.0] rlx
when i try to create directory
# /home/httpd/web/mkdir temp
mkdir: cannot create directory 'temp': Read-only file system
when i try to edit files under web folder i am getting
ERROR:"acl.asp" File is read only
my requirement is i need to create a folder under web and it should be writable.
Please revert back if any further details is required.
|
|
|
12-08-2016, 12:51 AM
|
#4
|
Senior Member
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278
|
Sounds like your filesystem is mounted as read only. So in /etc/fstab that filesystem should be mounted like this (I dont know the name of your filesystem, so this is an example):
Code:
/dev/sda1 /mount/point ext4 rw,relatime 0 1
/dev/sda2 /other/mount/point ext4 rw,relatime 0 2
The 'rw' means read/write, whereas 'ro' would mean readonly.
If you have already mounted it as readonly, you can remount it to read/write on the fly like this (this is not permanent, use /etc/fstab for permanant changes.)
Code:
mount -o remount,rw /dev/sda1 /mount/point
To be absolutely clear... These are examples using /dev/sda1 and /mount/point. You will have to modify the examples to fit your actual disk/partition names and mount points.
|
|
|
12-08-2016, 01:48 AM
|
#5
|
LQ Newbie
Registered: Dec 2016
Posts: 5
Original Poster
Rep:
|
@szboardstretcher Thank you very much for the reply
my filesystem is : squashfs
=================files under /etc is =====================
# cd /etc/
# ls
TZ , insdrv.sh ,samba
app.gwdt ,irf ,scripts
config ,mdev.conf ,services
config_default.xml ,orf ,shells
config_default_hs.xml ,passwd ,simplecfgservice.xml
cups ,ppp ,smb.conf
dhclient-script ,profile ,solar.conf
ethers ,radvd.conf ,solar.conf.in
ethertypes ,rc_boot_dual_linux ,version
group ,rc_voip ,versiontime
inetd.conf ,resolv.conf ,wscd.conf
init.d ,runoam.sh
inittab ,runsdk.sh
=================files under /dev is =====================
# cd /dev/
# ls
aipc_dev ,mtd2 ,mtdblock4 ,ttyp0
console ,mtd2ro ,mtdblock5 ,ttyp1
cpu_dma_latency ,mtd3 ,network_latency ,urandom
full ,mtd3ro ,network_throughput ,usbdev1.1_ep00
fuse ,mtd4 ,null ,usbdev1.1_ep81
kmsg ,mtd4ro ,ppp ,usbdev2.1_ep00
log ,mtd5 ,ptyp0 ,usbdev2.1_ep81
mem ,mtd5ro ,ptyp1 ,usbdev3.1_ep00
mtd0 ,mtdblock0 ,random ,usbdev3.1_ep81
mtd0ro ,mtdblock1 ,root ,voip
mtd1 ,mtdblock2 ,tty ,zero
mtd1ro ,mtdblock3 ,ttyS0
Thank you
Satish
Last edited by nlsatish26; 12-08-2016 at 01:51 AM.
|
|
|
12-08-2016, 08:59 AM
|
#6
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,189
|
Quote:
Originally Posted by nlsatish26
Thank you very much for your quick reply
I am very sorry for providing less details. I am new to forums.
|
No worries, but without details no one, anywhere, would be able to help.
Quote:
Router Details:
--Home based router
# uname -a
Linux (none) 2.6.30.9 #2867 Thu Dec 8 10:32:12 IST 2016 [luna SDK V1.5.0] rlx
|
This still tells us nothing. "Home based router"??? How about brande/model number of this router???? How it got Linux installed on it to start with? What version of Linux???
Quote:
when i try to create directory
# /home/httpd/web/mkdir temp
mkdir: cannot create directory 'temp': Read-only file system
when i try to edit files under web folder i am getting ERROR:"acl.asp" File is read only my requirement is i need to create a folder under web and it should be writable.
|
Right...this is what you said from the start. As szboardstretcher said, it seems like your file system is mounted read-only.
Quote:
Originally Posted by nlsatish26
my filesystem is : squashfs
|
Ok...so it's a squashfs filesystem. We can't tell anything based on a listing of the files.
|
|
|
12-08-2016, 09:11 AM
|
#7
|
Senior Member
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278
|
Type 'mount' and paste the output. 'ls' does nothing for us as mentioned.
|
|
|
12-12-2016, 12:33 AM
|
#8
|
LQ Newbie
Registered: Dec 2016
Posts: 5
Original Poster
Rep:
|
@szboardstretcher
# mount
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro,relatime)
proc on /proc type proc (rw,relatime)
ramfs on /var type ramfs (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
mdev on /dev type tmpfs (rw,relatime)
/dev/mtdblock3 on /var/config type jffs2 (rw,relatime)
none on /proc/bus/usb type usbfs (rw,relatime)
\134\13410.253.253.2\134wlan on /proc/wlan1 type cifs (rw,mand,relatime,unc=\\10.253.253.2\wlan,username=admin,addr=10.253.253.2,posixpaths,acl,rsize=1638 4,wsize=57344)
\134\13410.253.253.2\134wlan-vap0 on /proc/wlan1-vap0 type cifs (rw,mand,relatime,unc=\\10.253.253.2\wlan-vap0,username=admin,addr=10.253.253.2,posixpaths,acl,rsize=16384,wsize=57344)
\134\13410.253.253.2\134wlan-vap1 on /proc/wlan1-vap1 type cifs (rw,mand,relatime,unc=\\10.253.253.2\wlan-vap1,username=admin,addr=10.253.253.2,posixpaths,acl,rsize=16384,wsize=57344)
\134\13410.253.253.2\134wlan-vap2 on /proc/wlan1-vap2 type cifs (rw,mand,relatime,unc=\\10.253.253.2\wlan-vap2,username=admin,addr=10.253.253.2,posixpaths,acl,rsize=16384,wsize=57344)
\134\13410.253.253.2\134wlan-vap3 on /proc/wlan1-vap3 type cifs (rw,mand,relatime,unc=\\10.253.253.2\wlan-vap3,username=admin,addr=10.253.253.2,posixpaths,acl,rsize=16384,wsize=57344)
\134\13410.253.253.2\134wlan-vxd on /proc/wlan1-vxd type cifs (rw,mand,relatime,unc=\\10.253.253.2\wlan-vxd,username=admin,addr=10.253.253.2,posixpaths,acl,rsize=16384,wsize=57344)
\134\13410.253.253.2\134slave-tmp on /var/tmp/slave type cifs (rw,mand,relatime,unc=\\10.253.253.2\slave-tmp,username=admin,addr=10.253.253.2,posixpaths,acl,rsize=16384,wsize=57344)
|
|
|
All times are GMT -5. The time now is 07:39 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|