LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
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


Reply
  Search this Thread
Old 12-07-2016, 05:52 AM   #1
nlsatish26
LQ Newbie
 
Registered: Dec 2016
Posts: 5

Rep: Reputation: Disabled
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.
 
Old 12-07-2016, 08:13 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,753

Rep: Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983
Quote:
Originally Posted by nlsatish26 View Post
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??
 
Old 12-07-2016, 11:33 PM   #3
nlsatish26
LQ Newbie
 
Registered: Dec 2016
Posts: 5

Original Poster
Rep: Reputation: Disabled
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.
 
Old 12-08-2016, 12:51 AM   #4
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
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.
 
Old 12-08-2016, 01:48 AM   #5
nlsatish26
LQ Newbie
 
Registered: Dec 2016
Posts: 5

Original Poster
Rep: Reputation: Disabled
@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.
 
Old 12-08-2016, 08:59 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,753

Rep: Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983
Quote:
Originally Posted by nlsatish26 View Post
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.
 
Old 12-08-2016, 09:11 AM   #7
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Type 'mount' and paste the output. 'ls' does nothing for us as mentioned.
 
Old 12-12-2016, 12:33 AM   #8
nlsatish26
LQ Newbie
 
Registered: Dec 2016
Posts: 5

Original Poster
Rep: Reputation: Disabled
@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)
 
  


Reply



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
How to make Folder/file writable other than /var folder in Linux based router nlsatish26 Linux - Embedded & Single-board computer 2 12-07-2016 07:51 AM
bakup folder based on transaction on that folder hesisaboury Linux - Server 1 01-12-2014 10:17 AM
how can i make a folder writable on mac? the3rdchain Linux - Newbie 1 06-29-2013 01:04 AM
make multiple folder on samba linux & each folder can be access each person only Aneesh.T .S Linux - Server 1 01-31-2013 06:01 PM
Increasing size of /var folder or mount to another folder jbspain Linux - Server 7 11-18-2010 02:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 03:47 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
Open Source Consulting | Domain Registration