Announcement

Collapse
No announcement yet.

Cannot change ownership mounted drive from root

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Cannot change ownership mounted drive from root

    Hello, absolutely new here to the kubuntu distro and stumbled across this problem.
    After changing permissions to "owner" and "group" for the mounted drive /dev/sda2
    In terminal:
    sudo chmod u=rwx,g=rwx,o= /dev/sda2
    resulting in
    brwxrwx---
    I changed the ownership from root to watermann:
    sudo chown watermann /dev/sda2
    After giving password and then hit enter everything seemed o.k. by typing:
    ls -l /dev/sda2
    which resulted in
    brwxrwx--- watermann disk8

    After returning to that mounted drive everything was still owned by root and I could not do anything.
    What am I doing wrong or what did I forgot to do?

    #2
    or what did I forgot to do?
    So you have a hard drive, looks like sda, and you can't access partition 2, sda2.
    How is sda2 mounted?

    To see how everything is mounted, you could run
    mount
    or, perhaps
    cat /etc/mtab

    Try using that result in your statements? (instead of /dev/sda2)
    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    Comment


      #3
      Here's what I have done in the past.
      Suppose my problem partition is sdc1, mounted at /media/sdc1.
      Then:

      Ownership: change owner and group to mike
      sudo chown -R -v mike:mike /media/sdc1
      sudo is needed because until the command executes, root is the owner of the folder sdc1.
      The -R option means “recursively” so ownership is changed for the directory sdc1 AND its contents.
      To see it work, use the verbose option -v.

      Permissions: change to rwxrwx---
      sudo chmod -v -R 770 /media/sdc1
      changes the entire sdc1 directory (including (recursively -R) all its contents) to rwxrwx--- (for the owner mike, the group mike, and others).​

      (From Part 2 of my How-to:
      https://www.kubuntuforums.net/forum/...sole-beginners )

      (I am not the expert. I use "cookbook" methods I've tested.)
      An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

      Comment


        #4
        I did this:
        cat /etc/mtab
        which resulted in this line:

        /dev/sda2 /media/watermann/HOME-bkp ext4 rw,nosuid,nodev,relatime,errors=remount-ro 0 0

        I have not the foggiest idea how to interpret this.

        Comment


          #5
          Originally posted by Qqmike View Post
          Here's what I have done in the past.
          Suppose my problem partition is sdc1, mounted at /media/sdc1.
          Then:

          Ownership: change owner and group to mike
          sudo chown -R -v mike:mike /media/sdc1
          sudo is needed because until the command executes, root is the owner of the folder sdc1.
          The -R option means “recursively” so ownership is changed for the directory sdc1 AND its contents.
          To see it work, use the verbose option -v.

          Permissions: change to rwxrwx---
          sudo chmod -v -R 770 /media/sdc1
          changes the entire sdc1 directory (including (recursively -R) all its contents) to rwxrwx--- (for the owner mike, the group mike, and others).​

          (From Part 2 of my How-to:
          https://www.kubuntuforums.net/forum/...sole-beginners )

          (I am not the expert. I use "cookbook" methods I've tested.)
          Yes!! Your procedure worked.
          Thank you very much.

          Comment

          Users Viewing This Topic

          Collapse

          There are 0 users viewing this topic.

          Working...
          X