LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-16-2007, 09:46 AM   #1
Nazzgul
LQ Newbie
 
Registered: Oct 2007
Posts: 4

Rep: Reputation: 0
Read Only


How can I remove attribut read only on some file or directory?!
 
Old 10-16-2007, 10:10 AM   #2
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
su
type your root password

chmod -R a+w name_of_the_directory

a - means for all users
you can change it to 'u' - owner only or 'g' - group only, 'o' - other users
 
Old 10-16-2007, 11:39 AM   #3
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 67
Do you mean by regular unix-style write permissions, or the ext2 attributes?

For normal permissions, you can use your file manager, like konqueror, nautilus and so on - just right click on the file/dir and go to properties and there is usually something in there about permissions.

From the terminal you can also use the ls -ld /path/to/your/dir command to view the permissions (the first column of output); and change the permissions using the chmod command (which is a contraction of "change mode"). See the ls and chmod manual pages for more detailed descriptions of what they do. The command to add write permissions to your directory is:
Code:
chmod u+w /path/to/your/dir
This will add the "user is able to write" flag. Note that to modify the permissions of a a file or directory, you must have read write and execute permissions to the parent directory in which the file/directory exists.

If you mean not the unix-style permissions, but ext2 attributes, you can view existing attributes with the lsattr command, and change them with the chattr command. The attribute which sometimes makes files un-writable is the "i" flag - immutable. For example:
Code:
lsattr -d /path/to/your/dir
chattr -i /path/to/your/dir     # to remove the immutable flag.
See the lsattr and chattr manual pages for more information.

I think only root can change attributes. I haven't had much exposure to them, and as far as I know they are not very widely used.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 can I have: Root has Read-Write, user has read only for the boot filesystem? xmrkite Linux - Software 6 10-16-2008 05:31 AM
Raid disk problem : Attempt to read block from filesystem resulted in short read ElmPie Linux - General 5 08-26-2008 06:21 AM
USB HardDrive mounts read-only. Is there anyway to make it read-write? Fritz_Katz Linux - Hardware 7 09-13-2007 07:50 PM
Example share in smb.conf doesn't work - read/write vs read only kleptophobiac Linux - Networking 0 09-01-2004 08:14 PM
kernel panic unable to mount root (yes ive read/read other posts) dmx9595 Linux - General 4 01-17-2004 06:07 AM

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

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