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 - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-15-2012, 07:22 AM   #1
TamPepper
LQ Newbie
 
Registered: Jan 2012
Posts: 9

Rep: Reputation: Disabled
Chmod


I am trying to change permissions of a file on my PVR.
Currently the permissions are 755 and I wish to make it 777
I telnet into the directory and enter the chmod 777 logo.jpg
It returns read-only file system
How can I change this ?
 
Old 01-15-2012, 07:31 AM   #2
MartinStrec
Member
 
Registered: Jan 2012
Location: Czech
Distribution: Fedora, RHEL, Ubuntu, Mint
Posts: 110

Rep: Reputation: 14
It looks you've insufficient permissions. Are you logged in as 'root'? Try to switch user by 'su' or 'sudo -i' command. Look who is the file owner (I guess it's 'root').

Do not forget, rights 755 it means full access (read/write/execute) for owner, read/execute for owner group, read/execute for everyone else. The conclusion: you can change rights only if you are owner (or superuser).
 
Old 01-15-2012, 07:46 AM   #3
devUnix
Member
 
Registered: Oct 2010
Posts: 606

Rep: Reputation: 59
Have a look at the following commands to understand why you're unable to change the file permissions:

Code:
[test@localhost ~]$ touch /tmp/hi.txt
[test@localhost ~]$ chmod 755 /tmp/hi.txt
[test@localhost ~]$ ls -l /tmp/hi.txt 
-rwxr-xr-x. 1 test test 0 Jan 15 19:14 /tmp/hi.txt
[test@localhost ~]$ logout
[demo@localhost Bash]$ chmod 777 /tmp/hi.txt 
chmod: changing permissions of `/tmp/hi.txt': Operation not permitted
[demo@localhost Bash]$ su - root
Password: 
[root@localhost ~]# chmod 777 /tmp/hi.txt 
[root@localhost ~]# ls -l /tmp/hi.txt 
-rwxrwxrwx. 1 test test 0 Jan 15 19:14 /tmp/hi.txt
[root@localhost ~]#
Note: Only the owner or the Super User i.e. root can change file permissions.
 
Old 01-15-2012, 07:49 AM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
It returns read-only file system
Mount it read/write

Kind regards
 
Old 01-15-2012, 08:00 AM   #5
TamPepper
LQ Newbie
 
Registered: Jan 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
Can I

Can I do this from telnet on a Windows 7 box ?
 
Old 01-15-2012, 08:18 AM   #6
MartinStrec
Member
 
Registered: Jan 2012
Location: Czech
Distribution: Fedora, RHEL, Ubuntu, Mint
Posts: 110

Rep: Reputation: 14
Hi,

your file '/tmp/hi.txt' has been created by user 'test' and it has got rights 755 (rwxr-xr-x).

then you ran command 'chmod' as user 'demo'. User 'demo' is not the owner of '/tmp/hi.txt' so that user cannot change mode (chmod).

For more, I look to the documentation and the chmod is allowed just for file owner or superuser. See 'man chmod'.

Just my idea of changing permissions out of owner is to use 'sudo' command if it's necessary. Even you have to configure it to do not ask passwords in that case.
 
Old 01-15-2012, 09:01 AM   #7
TamPepper
LQ Newbie
 
Registered: Jan 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
According to ls -l the file belongs to root and I am logged in as root
 
Old 01-15-2012, 09:06 AM   #8
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
It returns read-only file system
You are on a read only filesystem.
Mount it read/write.
Quote:
Can I do this from telnet on a Windows 7 box ?
Do you telnet to or from a windows box?

Kind regards
 
Old 01-15-2012, 09:14 AM   #9
TamPepper
LQ Newbie
 
Registered: Jan 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
From Windows 7 box to the PVR
 
Old 01-15-2012, 09:17 AM   #10
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Please post the output from
Code:
ls -l
mount
Kind regards
 
Old 01-15-2012, 09:30 AM   #11
TamPepper
LQ Newbie
 
Registered: Jan 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
Is there a tenet command for sending the results to a text file on my C drive (Windows)
 
Old 01-15-2012, 09:35 AM   #12
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
AFAIK you can't
You could try to copy/paste the output from the terminal.

Kind regards
 
Old 01-15-2012, 09:43 AM   #13
TamPepper
LQ Newbie
 
Registered: Jan 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
I "think" I have attached it to this
First ime attempt
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	23
Size:	52.6 KB
ID:	8843  
 
Old 01-15-2012, 09:45 AM   #14
vp0619520
Member
 
Registered: Jan 2012
Posts: 55

Rep: Reputation: Disabled
You are on a read only filesystem.
Try this:
Code:
mount -o remount,rw  /dev/partitionname
 
1 members found this post helpful.
Old 01-15-2012, 09:57 AM   #15
devUnix
Member
 
Registered: Oct 2010
Posts: 606

Rep: Reputation: 59
Quote:
Originally Posted by vp0619520 View Post
You are on a read only filesystem.
Try this:
Code:
mount -o remount,rw  /dev/partitionname
That should work!

Do it as "root".


Code:
[demo@localhost bin]$ touch /media/sf_Books/hello
touch: cannot touch `/media/sf_Books/hello': Read-only file system

[root@localhost ~]# mount -o remount,rw /media/sf_Books/

[demo@localhost bin]$ touch /media/sf_Books/hello
[demo@localhost bin]$ ls -l /media/sf_Books/hello
-rwxrwxrwx. 1 root vboxsf 0 Jan 15 21:25 /media/sf_Books/hello
 
  


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
Sticky Bit? (ie: chmod 2770 vs chmod 770) JeffC1 Linux - Newbie 7 03-18-2010 07:39 AM
Apache: difference between chmod 644 and chmod 666 and chmod 600 for output/txt/dat? frenchn00b Programming 6 04-22-2009 01:10 PM
chmod 775 to only the directories and chmod 664 to only the files? apachenew Linux - Security 6 09-27-2007 03:26 PM
chmod, external usb, vfat - can't chmod a directory itsjustme Slackware 2 04-02-2006 04:23 PM
What can we do if we type chmod ugo-x /bin/chmod ?????? bunny123 Linux - Software 3 02-01-2005 08:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:29 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