LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do you change the file Property from Read Only to .... (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-you-change-the-file-property-from-read-only-to-182092/)

Charlie Chan 05-16-2004 12:45 PM

How do you change the file Property from Read Only to ....
 
I installed YUM from Duke U and need to add header information to the yum.conf file by copy and paste method. However, the file is marked read only. How do I change the file property from Read Only.:confused:

jtshaw 05-16-2004 12:52 PM

chmod is the command used to change file attributes. I'll give you the basics here:

There are three catagories of permissions for a file, owner, group, everyone else. Each catagory has read, write, and execute bits. When you do an ls -la file you'll see a list that might look something like this:

-rw-r--r-- 1 root root 7107 May 3 12:22 make.conf

Ignore the first - for now. The first rw- means the file is readable and writeable to the owner (person whom created the file). The second r-- means members of the group the file was created under can read it. The last r-- means all others can read the file. Ignore the 1 for now. The first word after the 1 is the user that created the file, second word is the group the file was created under, then the date of last access, and the file name.

Now, to change permissions for the owner you could do chmod u+r to add read, chmod u+w to add write, chmod u+rx woudl add read and execute. Putting a - instead of a plus removes those permissions. Chaning u to g changes the group permissions, changing it to o changes the world permissions. Using a+ or a- means add or subtract the permissions for all catagories.

so in this case, chmod u+w yum.conf would probably do the trick.

This help?


All times are GMT -5. The time now is 08:13 PM.