Announcement

Collapse
No announcement yet.

[Solved] write permissions

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [Solved] write permissions

    I am finding that I do not have write permissions on many of the files I want to edit. Such as sources.list, wicd.cfg and some other files. I use Kwrite. I have also used other text editors and they give me the same problems.

    I am using a compaq nx9600 stock notebook computer.

    I have just updated to 9.04 from 8.10 witch I had the same problem so I did a clean install instead of the update.

    I am also trying to figure out how to get third party packages installed in 9.04 as in 8.10 I had a program that automatically installed all deb files for me but can not figure out which program it was.

    I am having other problems but this is the first and main one I need fixed. I came across this problem while trying in vain to get my wireless system to work. Thank goodness the ethernet cable works.

    Any help would be greatly appreciated.

    I had typed into the bash inter-face sudo su for root permissions before I attempted to run kwrite.

    #2
    Re: write permissions

    Hi,

    Yes some files are protected.... If you want to access them, well I prefere "Bash Konsole". Below I will give you an example....


    1. Open Bash Konsole.
    2. Go to the place where the file is standing.
    3. Type ls -al

    Now you will see all the files in the directory standing and for the name the right you have for that file: below you have an example from a file from me:

    drwxr-xr-x 2 frederik frederik 4096 2009-05-09 20:49 .
    drwxr-xr-x 6 frederik frederik 4096 2009-05-09 20:48 ..
    -rw-r--r-- 1 frederik frederik 0 2009-05-09 20:49 file1.txt

    The red letter are the rights for the file "file1.txt"
    Take a note from the persions there at moment, so you can put them later back.

    Now comes the most funny part

    BINAIR DECIMAL PERMISSIONS
    001 1 eXecute
    010 2 Write
    100 4 Read
    011 3 Write & eXecute
    101 5 Read & eXecute
    110 6 Read & Write
    111 7 Read & Write & eXecute


    So remember that you are standing at that directory. I want for mine example "file1.txt" that I've everything from rights.

    I will then type: chmod 777 file1.txt

    This is the result ===> -rwxrwxrwx 1 frederik frederik 0 2009-05-09 20:49 file1.txt

    It means that I can do everything with it now!

    owner = rwx ==> 7
    group = rwx ==> 7
    other (world) = rwx ==> 7


    chmod 777

    with chmod you can change rights!!!! Use the table to see what is needed!!!

    I recommended that you first make a test directory and a test file so you good understand what you are doing!


    You can make a test directory with followed command: mkdir test
    You can easely make a file with command: touch file1.txt

    now you will have the same example as me, try to open it when you test the different options with "kate" or "vi" or another editor:

    Frederik@Kubuntu:~/Documenten/test$ ls -al
    totaal 8
    drwxr-xr-x 2 frederik frederik 4096 2009-05-09 20:49 .
    drwxr-xr-x 6 frederik frederik 4096 2009-05-09 20:48 ..
    -rwxrwxrwx 1 frederik frederik 0 2009-05-09 20:49 file1.txt


    There is also a graphical way with Dolphin:

    Make the file higlighted (BLEU) and pres ALT+ENTER
    Then go to AccessRights and there you have it graphicaly

    So, that should be enough to fix your problem!

    Greetz 8)
    The diamond can not be polished without friction, <br /> nor a man perfected without trials.

    Comment


      #3
      Re: [Solved] write permissions

      Thanks for the help Windows2003. That did the trick as far as getting me the write permissions. Now I just have to figure out how to get everything back in working order.

      Bright Blessings
      TheTiny1

      Comment


        #4
        Re: [Solved] write permissions

        Yes, all files (well, almost all) outside your /home/username directory are owned by root and the most you as a normal user can do is look at them, sometimes not even that. You should not really change the permissions at all but use the tools provided to edit system files. On the CLI you could:

        Code:
        sudo vi /etc/sources/sources.list
        or

        Code:
        sudo nano /etc/sourches/sources.list
        For a GUI you could type on the command line:

        Code:
        kdesu kate
        or

        Code:
        kdesu kwrite
        But to reiterate - it is not good practice to mess with permissions. It probably will not matter that much if the computer is your own and nobody else gets access to it. If they do, however, a chmod 777 will give ANYBODY the right to mess with system files. And if your cohabs are in the least bit interested or nosy you will find that they will render your system unbootable before you can say "Oh dear, I've really messed this one up..."
        Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

        Comment

        Working...
        X