File permissions/ownership issues yet again!

Discussion in 'Linux, BSD and Other OS's' started by DavidNW, Nov 16, 2006.

  1. DavidNW

    DavidNW Big Geek

    Likes Received:
    0
    Trophy Points:
    16
    I have formatted my external USB drive (formerly formatted in NTFS under Windows) in Ext 3 format in Ubuntu Dapper. I did this as I'm no longer using Windows and wanted to free-up the external drive to to use for storing data in Ubuntu.

    After the formatting, I cannot access the drive at all due to not having the appropriate ownership/file permissions. All I want to do change ownership to myself 'david'.

    I have tried a series of Linux bash commands to try and change ownership/permissions but cannot change anything so that I can write/save any data to the drive - I'm guessing I'm using the incorrect syntax.

    I'm attaching a couple of screenshots to aid any help/advice.

    Many thanks,

    David.
     
  2. megamaced

    megamaced Geek Geek Geek!

    Likes Received:
    0
    Trophy Points:
    36
    try

    Code:
    sudo chown -R david:david /media/usbdisk
     
  3. donkey42

    donkey42 plank

    Likes Received:
    9
    Trophy Points:
    38
    you have to be root to be able to modfify anything owned by root
     
  4. DavidNW

    DavidNW Big Geek

    Likes Received:
    0
    Trophy Points:
    16
    Well done, Mega!

    That's has done it - yippppppee:beer: !
     
  5. DavidNW

    DavidNW Big Geek

    Likes Received:
    0
    Trophy Points:
    16
    Yes, I was, Dave. Mega has provided the necessary code, so it's sorted now! Thanks for your advice anyway. Thank goodness for HWF - that's all I can say! :good:
     
  6. megamaced

    megamaced Geek Geek Geek!

    Likes Received:
    0
    Trophy Points:
    36
    Good :)

    I'll break down the command for you so it's easier to understand in future:

    'sudo' = Use root privileges
    'chown' = Change Owner
    'R' switch = Recursive (Apply ownership change to all subfolders and files)
    'david:david' = Username:usergroup
     
  7. donkey42

    donkey42 plank

    Likes Received:
    9
    Trophy Points:
    38
    i can't disagree with that - mega is one of the HWF gods
     
  8. DavidNW

    DavidNW Big Geek

    Likes Received:
    0
    Trophy Points:
    16
    Cheers, Mega.

    However, there is another problem now in Mandriva! I used: 'sudo chown -R david:david firefox' to change ownership of an old 'firefox' directory in my Mandriva 'Home' folder.

    I had tried to delete the 'firefox' directory before but could not do so due to having 'access denied' through not having the correct permissions, I guess. Anyway, I did apparently, change ownership by typing 'sudo chown -R david:david firefox' in the terminal window, as I was able to delete the 'firefox' directory.

    However, now I can't get to root via the terminal window by typing: 'su' followed by my password. I guess I have screwed up somewhere along the line. Unfortunately, this seems to have made my password invalid, as when I go to type it to gain access to MCC - I get a 'password invalid' message. Now, this also means that I now cannot log on to Mandriva at all! Any ideas as to how I can remedy things?

    Cheers,

    David.
     
  9. donkey42

    donkey42 plank

    Likes Received:
    9
    Trophy Points:
    38
    i think you need to boot mandy's safe mode and type
    Code:
    su
    to login as root, then
    Code:
    passwd
    to create a new root password
     
  10. DavidNW

    DavidNW Big Geek

    Likes Received:
    0
    Trophy Points:
    16

    I've tried doing that via the Mandriva CD, but there's no 'safe mode' as such, and I can only see an option for a 'rescue mode' , which basically doesn't tell me anything of use! I'm p****d now, as a reinstallation is looking on the cards to fix things as I have no idea where to start. :(
     
  11. donkey42

    donkey42 plank

    Likes Received:
    9
    Trophy Points:
    38
    don't start again, have you got your system partitioned maually into 3 partitions ?
    • partition 1 = /
    • partition 2 = /home
    • partition 3 = swap
    if you have just delete /home/david/.kde and reinstall, all your data in /home will be untouched

    previous post was instructions to reset root password,
    by saying "safe mode" i meant - select "failsafe" from boot menu, but not sure if you have to be in "safe mode to reset root password, try it in normal mode first

    Edit: including emails, i burnt a cd with /home/<user> then deleted /home/<user>/.kde from my system
     
  12. megamaced

    megamaced Geek Geek Geek!

    Likes Received:
    0
    Trophy Points:
    36
    I am not familiar with Mandriva I am afraid. However, the sudo command is really only used in Ubuntu. If you wanted to perform an administrative task in Mandriva, you would normally log in as root via SU and forgo using sudo.

    Maybe AT will have an answer for you :)
     
  13. DavidNW

    DavidNW Big Geek

    Likes Received:
    0
    Trophy Points:
    16
    Well, there you go - trust me to use a Ubuntu command (sudo) in Mandriva! Things really got screwed -up (long story) so I decided to reinstall Mandriva on the first hard drive no big deal as I hadn't got much stuff on it, and after all - I'd got a lovely install of Ubuntu on my second hard drive - so no problems? Wrong!!

    I reinstalled Mandriva on the first hard drive and it overwrote the bootloader for Ubuntu - Arrrragh!! I could only boot into Mandriva. Couldn't figure a way of trying to get into my Ubuntu install, so reinstalled it!

    Everything is okay now, but I've lost a lot of time and have had to set up all my respositories and download apps on both distros - what a pain - not to mention all the personalisation (tweaks), etc!

    I really must either stop tinkering around (but how do you learn anything?) or do so serious studying on recovering/repairing Linux distros.
     
  14. megamaced

    megamaced Geek Geek Geek!

    Likes Received:
    0
    Trophy Points:
    36
    Honestly, you really didn't need to reinstall Ubuntu as well! Fixing the boot loader is not that difficult!

    But I agree with you. How else are we going to learn about Linux if we don't play around with it? :)
     
  15. donkey42

    donkey42 plank

    Likes Received:
    9
    Trophy Points:
    38
    thats true, :eek:fftopic: [ot]keep your old (and apparently dead or dieing) installs of *nix, then after few weeks, use it again, you will probably be able to fix it[/ot]
     

Share This Page