LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-22-2010, 02:02 PM   #1
ted_chou12
Member
 
Registered: Aug 2010
Location: Zhongli, Taoyuan
Distribution: slackware, windows, debian (armv4l GNU/Linux)
Posts: 431
Blog Entries: 32

Rep: Reputation: 3
permission, read only directory, logged in as root


Hi all, its my first time posting here:
I am having problems trying to create a file or move a file to the directory /bin/codepages/here
Code:
# cat>/bin/codepages/map
-sh: can't create /bin/codepages/map: Read-only file system
I want to add other encoding lang here, eg utf8,cp950..etc.
Yes, I am logged in as root, the permission of this folder seems to be "rwxr-xr-x" or 0755, owner root.
Here is the mount information:
Code:
# mount
rootfs on / type rootfs (rw)
/dev/root on / type jffs2 (ro)
tmpfs on /var type tmpfs (rw)
tmpfs on /tmp type tmpfs (rw)
tmpfs on /usb type tmpfs (rw)
none on /proc type proc (rw)
mdev on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /etc type tmpfs (rw)
/dev/sda1 on /usb/sda1 type fuseblk (rw,noatime,user_id=0,group_id=0,allow_other)
I tried to search for this problem, I know there are plenty cases previously, but they seem to say something about fsck after remount, if that is the case, then how do you do that? via putty? or add it to the bootup script (which is what file and path?). I am very new to linux, please bare with me.
Thanks!
Ted

Last edited by ted_chou12; 08-22-2010 at 02:14 PM.
 
Old 08-22-2010, 02:46 PM   #2
r0b0
Member
 
Registered: Aug 2004
Location: Europe
Posts: 608

Rep: Reputation: 50
Hi Ted and welcome to LQ!

Your root directory is mounted read-only. That means that even root will not be able to write there, including creating new files. As to why is your root directory mounted read-only, we would need to know a little bit more about your system. What is it? It looks cool to me - jffs2 filesystem???

It should be possible to re-mount the filesystem in read-write mode. I would try the command


Code:
# mount /dev/root / -o remount=rw
 
Old 08-22-2010, 02:49 PM   #3
Elv13
Member
 
Registered: Apr 2006
Location: Montreal,Quebec
Distribution: Gentoo
Posts: 825

Rep: Reputation: 129Reputation: 129
Distribution? It may be SELinux or AppArmor or just some kind of stupidity mask to prevent working on critical directories. When you said you were logged in as root, with the root using name, su, "su -" or sudo?

EDIT: the above poster saw something that I did not, he/she is right, I just lokked at rootfs, skipped /dev/root

Last edited by Elv13; 08-22-2010 at 02:50 PM.
 
Old 08-22-2010, 03:10 PM   #4
ted_chou12
Member
 
Registered: Aug 2010
Location: Zhongli, Taoyuan
Distribution: slackware, windows, debian (armv4l GNU/Linux)
Posts: 431

Original Poster
Blog Entries: 32

Rep: Reputation: 3
Hi, thank you for your quick response! This is a very simple NAS machine, I'm trying on a user DIY firmware, the system is here:
Code:
# uname -a
Linux nas 2.6.16-gazineu #13 Mon Jun 21 21:43:59 BRT 2010 armv4l GNU/Linux
I tried the command line you gave me, but the output seems to be weird:
Code:
# mount /dev/root / -o remount=rw
mount: mounting /dev/root on / failed: Invalid argument
Here is the fstab info:
Code:
# cat /etc/fstab
/dev/ram0       /               ext2    defaults        0       0
none            /proc           proc    defaults        0       0
none            /dev/pts        devpts  defaults        0       0
I just read from an online article, defaults means is rw, so shouldn't that mean I can write into the root?
Thanks again!!!
Ted
 
  


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
Read/write permission to ALL users on a directory and everything in it Virtuality Linux - Newbie 3 12-13-2007 08:29 PM
permission issues in terminal while logged in as root tekyd Debian 6 03-03-2006 10:39 PM
root gets 'Permission denied' to directory mikemrh9 Linux - Security 2 11-18-2005 04:15 AM
wolf et needs to be logged in as root for sound (permission issue) dr_unpleasant Linux - Software 0 07-17-2004 02:26 PM
Permission Denied when logged in as root? mackdady Linux - Software 6 03-30-2004 04:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:09 AM.

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