New partition: only root has rw rights











up vote
0
down vote

favorite
1












I have set up 16.04 manually and have now two partitions (ext4). My second (and bigger) partition can be written at only by root. Now when I hit sudo su in the terminal and my password, I'm still forbidden access to the folder. I actually think I messed up the partition process... My goal was to have two partitions, one for ubuntu and one for my data. But now everything is on the same (small) partition.



After
sudo parted -l
I get



Festplatte /dev/sda: 500GB

Sektorgröße (logisch/physisch): 512B/512B

Partitionstabelle: msdos

Disk-Flags:



Nummer  Anfang Ende    Größe   Typ       Dateisystem     Flags
1 1049kB 15,7GB 15,7GB primary ext4 boot
3 15,7GB 496GB 480GB primary ext4
2 496GB 500GB 4223MB extended
5 496GB 500GB 4223MB logical linux-swap(v1)


3 is the one with the problem.



From

mount | grep 'media/johanna/home'

I get
/dev/sda3 on /media/johanna/home type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)










share|improve this question
























  • How are you mounting this partition?
    – Ravexina
    May 2 '17 at 18:48










  • When you say "I actually think I messed up the partition process", what happened to make you sat that? What is the result of "sudo parted -l"
    – user680858
    May 2 '17 at 19:07










  • @Ravexina I think I did that with GParted, it's already a while ago and I tried various kinds of doing it.
    – user293817
    May 2 '17 at 19:37










  • @user293817 I mean are you using fstab or something to mount your device?
    – Ravexina
    May 2 '17 at 19:39










  • Add the output of this command to your question: grep '^[^#]' /etc/fstab, also specify which device is your hard drive which got the problem.
    – Ravexina
    May 2 '17 at 19:43















up vote
0
down vote

favorite
1












I have set up 16.04 manually and have now two partitions (ext4). My second (and bigger) partition can be written at only by root. Now when I hit sudo su in the terminal and my password, I'm still forbidden access to the folder. I actually think I messed up the partition process... My goal was to have two partitions, one for ubuntu and one for my data. But now everything is on the same (small) partition.



After
sudo parted -l
I get



Festplatte /dev/sda: 500GB

Sektorgröße (logisch/physisch): 512B/512B

Partitionstabelle: msdos

Disk-Flags:



Nummer  Anfang Ende    Größe   Typ       Dateisystem     Flags
1 1049kB 15,7GB 15,7GB primary ext4 boot
3 15,7GB 496GB 480GB primary ext4
2 496GB 500GB 4223MB extended
5 496GB 500GB 4223MB logical linux-swap(v1)


3 is the one with the problem.



From

mount | grep 'media/johanna/home'

I get
/dev/sda3 on /media/johanna/home type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)










share|improve this question
























  • How are you mounting this partition?
    – Ravexina
    May 2 '17 at 18:48










  • When you say "I actually think I messed up the partition process", what happened to make you sat that? What is the result of "sudo parted -l"
    – user680858
    May 2 '17 at 19:07










  • @Ravexina I think I did that with GParted, it's already a while ago and I tried various kinds of doing it.
    – user293817
    May 2 '17 at 19:37










  • @user293817 I mean are you using fstab or something to mount your device?
    – Ravexina
    May 2 '17 at 19:39










  • Add the output of this command to your question: grep '^[^#]' /etc/fstab, also specify which device is your hard drive which got the problem.
    – Ravexina
    May 2 '17 at 19:43













up vote
0
down vote

favorite
1









up vote
0
down vote

favorite
1






1





I have set up 16.04 manually and have now two partitions (ext4). My second (and bigger) partition can be written at only by root. Now when I hit sudo su in the terminal and my password, I'm still forbidden access to the folder. I actually think I messed up the partition process... My goal was to have two partitions, one for ubuntu and one for my data. But now everything is on the same (small) partition.



After
sudo parted -l
I get



Festplatte /dev/sda: 500GB

Sektorgröße (logisch/physisch): 512B/512B

Partitionstabelle: msdos

Disk-Flags:



Nummer  Anfang Ende    Größe   Typ       Dateisystem     Flags
1 1049kB 15,7GB 15,7GB primary ext4 boot
3 15,7GB 496GB 480GB primary ext4
2 496GB 500GB 4223MB extended
5 496GB 500GB 4223MB logical linux-swap(v1)


3 is the one with the problem.



From

mount | grep 'media/johanna/home'

I get
/dev/sda3 on /media/johanna/home type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)










share|improve this question















I have set up 16.04 manually and have now two partitions (ext4). My second (and bigger) partition can be written at only by root. Now when I hit sudo su in the terminal and my password, I'm still forbidden access to the folder. I actually think I messed up the partition process... My goal was to have two partitions, one for ubuntu and one for my data. But now everything is on the same (small) partition.



After
sudo parted -l
I get



Festplatte /dev/sda: 500GB

Sektorgröße (logisch/physisch): 512B/512B

Partitionstabelle: msdos

Disk-Flags:



Nummer  Anfang Ende    Größe   Typ       Dateisystem     Flags
1 1049kB 15,7GB 15,7GB primary ext4 boot
3 15,7GB 496GB 480GB primary ext4
2 496GB 500GB 4223MB extended
5 496GB 500GB 4223MB logical linux-swap(v1)


3 is the one with the problem.



From

mount | grep 'media/johanna/home'

I get
/dev/sda3 on /media/johanna/home type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)







partitioning system-installation permissions root






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 2 '17 at 21:49

























asked May 2 '17 at 18:44









user293817

208149




208149












  • How are you mounting this partition?
    – Ravexina
    May 2 '17 at 18:48










  • When you say "I actually think I messed up the partition process", what happened to make you sat that? What is the result of "sudo parted -l"
    – user680858
    May 2 '17 at 19:07










  • @Ravexina I think I did that with GParted, it's already a while ago and I tried various kinds of doing it.
    – user293817
    May 2 '17 at 19:37










  • @user293817 I mean are you using fstab or something to mount your device?
    – Ravexina
    May 2 '17 at 19:39










  • Add the output of this command to your question: grep '^[^#]' /etc/fstab, also specify which device is your hard drive which got the problem.
    – Ravexina
    May 2 '17 at 19:43


















  • How are you mounting this partition?
    – Ravexina
    May 2 '17 at 18:48










  • When you say "I actually think I messed up the partition process", what happened to make you sat that? What is the result of "sudo parted -l"
    – user680858
    May 2 '17 at 19:07










  • @Ravexina I think I did that with GParted, it's already a while ago and I tried various kinds of doing it.
    – user293817
    May 2 '17 at 19:37










  • @user293817 I mean are you using fstab or something to mount your device?
    – Ravexina
    May 2 '17 at 19:39










  • Add the output of this command to your question: grep '^[^#]' /etc/fstab, also specify which device is your hard drive which got the problem.
    – Ravexina
    May 2 '17 at 19:43
















How are you mounting this partition?
– Ravexina
May 2 '17 at 18:48




How are you mounting this partition?
– Ravexina
May 2 '17 at 18:48












When you say "I actually think I messed up the partition process", what happened to make you sat that? What is the result of "sudo parted -l"
– user680858
May 2 '17 at 19:07




When you say "I actually think I messed up the partition process", what happened to make you sat that? What is the result of "sudo parted -l"
– user680858
May 2 '17 at 19:07












@Ravexina I think I did that with GParted, it's already a while ago and I tried various kinds of doing it.
– user293817
May 2 '17 at 19:37




@Ravexina I think I did that with GParted, it's already a while ago and I tried various kinds of doing it.
– user293817
May 2 '17 at 19:37












@user293817 I mean are you using fstab or something to mount your device?
– Ravexina
May 2 '17 at 19:39




@user293817 I mean are you using fstab or something to mount your device?
– Ravexina
May 2 '17 at 19:39












Add the output of this command to your question: grep '^[^#]' /etc/fstab, also specify which device is your hard drive which got the problem.
– Ravexina
May 2 '17 at 19:43




Add the output of this command to your question: grep '^[^#]' /etc/fstab, also specify which device is your hard drive which got the problem.
– Ravexina
May 2 '17 at 19:43










3 Answers
3






active

oldest

votes

















up vote
1
down vote



accepted










First create a mount-point:



sudo mkdir /media/data


Change the ownership of the mount-point:



sudo chown johanna: /media/data


Set the permissions:



sudo chmod 755 /media/data


Now open the fstab-file:



sudo nano /etc/fstab


Add the following line at the end of the file:



/dev/sda3  /media/data  ext4 defaults  0  2


Press Ctrl+o and then hit Enter



Press Ctrl+x



Close the terminal and reboot. You will be able to write to your mounted partition now without root-privileges.



Note



On german keyboards the Ctrl-key should be the left Strg-key.



Explanation



It looks like you mounted the partition via the desktop-icon or opening the partition in the file-manager. Doing so will automatically create the directory /media/<username>/<partition-name>, the partition-name might be the label of the partition (if one exists) or the UUID of the partition.



This automatically created folder should be owned by and you should have read- and write-permissions, but mysteriously this doesn't seems to be the case. Also, this folder will be removed as soon as the partition is unmounted, if you don't unmount the partition yourself, the partition will be unmounted whenever the system shuts down. This explains that any changes (ownership, permissions) will not survive a reboot.



To ship around this we create a directory which we use as mount-point, adjust ownership and permissions of the directory and at last we add an entry to the fstab-file, so the partition will be auto-mounted at start-up. This directory is not going to be removed when the partition is unmounted.



Addition



I also have the impression that you wanted to set up your installation with a separate /home-partition. It seems you created the partition, but you didn't specify the mount-point (which would be /home) during installation. As the result you got a system with your system-partition and a big, but empty partition. Don't worry, you still can achieve this by copying the contents of the /home-folder to the partition and after doing so changing the mount-point of the partition to /home, here is a nice "How to do that":



https://help.ubuntu.com/community/Partitioning/Home/Moving






share|improve this answer























  • Thanks, this really solved my problem. I have already copied my home-folder which seems to work fine. If I have any problems with that, I'll have a look at that link. Thanks for the additional info.
    – user293817
    May 4 '17 at 20:23










  • You're welcome, would have answered in German, but we have to keep it in English here.
    – mook765
    May 4 '17 at 21:21


















up vote
0
down vote













That a normal user can't write to a newly created partition is perfectly normal. That root can't access it, though, isn't.



First off: Mount the partition. You will learn why below.



Your mount point should have these permissions, owner, and group:



drwxr-xr-x  25 root root


Navigate to the folder where your mount point is. So if your mount point is /media/john/data, navigate to /media/john in the terminal. Then execute ll. You can get it to have the properties mentioned above by executing these commands:



sudo chown root data
sudo chgrp root data
sudo chmod 751 data


You, however, want access for yourself. So swap root in the first 2 lines out for your own user name:



sudo chown john data
sudo chgrp john data
sudo chmod 751 data


You have to execute these commands when the partition is mounted. When the partition is mounted, these commands modify the properties of the root of the file system of the mounted partition. If nothing is mounted in that folder, the commands modify the properties of the folder on the FS mounted in /media/john (probably the same one as in / on your system). You don't want this.






share|improve this answer





















  • this only helps for the time being. when i unmount the partition and mount it again, I've got the same problem as before.
    – user293817
    May 2 '17 at 22:20










  • This seems weird. To make sure it's not a bug in Nautilus, please check whether the permissions change back after unmounting and remounting. You can mount via sudo mount /dev/sda3 /media/john/data and unmount via sudo umount /dev/sda3. Note that it's umount, not unmount. Please also test whether you can write to the FS from the command line. This command should create a new file whose name is the current date and time. I can't post it here directly because markdown formatting won't work with it. That's why I use a pastebin link.
    – UTF-8
    May 3 '17 at 12:15


















up vote
0
down vote













I think I have a much, much easier way to achieve this (for GUI users), and re-mounting it does work with same permissions. I do everything with Nautilus. Normally the new partition will appear in the left side of Nautilus, and one can click it to mount it, right? For this procedure you start Nautilus as root user, I do this with "gksudo nautilus" (Tip; assign a key combination in system settings, keyboard, custom). Type root password in the dialog. Then mount the drive, click properties, and go to the rights tab (don't know the exact term because my system is in dutch), and change to your preferences. That's it.



If this is not working for you I would remove the partition in GParted and re-create it, and try again, since you have applied several operation on it that maybe could interfere.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f911187%2fnew-partition-only-root-has-rw-rights%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote



    accepted










    First create a mount-point:



    sudo mkdir /media/data


    Change the ownership of the mount-point:



    sudo chown johanna: /media/data


    Set the permissions:



    sudo chmod 755 /media/data


    Now open the fstab-file:



    sudo nano /etc/fstab


    Add the following line at the end of the file:



    /dev/sda3  /media/data  ext4 defaults  0  2


    Press Ctrl+o and then hit Enter



    Press Ctrl+x



    Close the terminal and reboot. You will be able to write to your mounted partition now without root-privileges.



    Note



    On german keyboards the Ctrl-key should be the left Strg-key.



    Explanation



    It looks like you mounted the partition via the desktop-icon or opening the partition in the file-manager. Doing so will automatically create the directory /media/<username>/<partition-name>, the partition-name might be the label of the partition (if one exists) or the UUID of the partition.



    This automatically created folder should be owned by and you should have read- and write-permissions, but mysteriously this doesn't seems to be the case. Also, this folder will be removed as soon as the partition is unmounted, if you don't unmount the partition yourself, the partition will be unmounted whenever the system shuts down. This explains that any changes (ownership, permissions) will not survive a reboot.



    To ship around this we create a directory which we use as mount-point, adjust ownership and permissions of the directory and at last we add an entry to the fstab-file, so the partition will be auto-mounted at start-up. This directory is not going to be removed when the partition is unmounted.



    Addition



    I also have the impression that you wanted to set up your installation with a separate /home-partition. It seems you created the partition, but you didn't specify the mount-point (which would be /home) during installation. As the result you got a system with your system-partition and a big, but empty partition. Don't worry, you still can achieve this by copying the contents of the /home-folder to the partition and after doing so changing the mount-point of the partition to /home, here is a nice "How to do that":



    https://help.ubuntu.com/community/Partitioning/Home/Moving






    share|improve this answer























    • Thanks, this really solved my problem. I have already copied my home-folder which seems to work fine. If I have any problems with that, I'll have a look at that link. Thanks for the additional info.
      – user293817
      May 4 '17 at 20:23










    • You're welcome, would have answered in German, but we have to keep it in English here.
      – mook765
      May 4 '17 at 21:21















    up vote
    1
    down vote



    accepted










    First create a mount-point:



    sudo mkdir /media/data


    Change the ownership of the mount-point:



    sudo chown johanna: /media/data


    Set the permissions:



    sudo chmod 755 /media/data


    Now open the fstab-file:



    sudo nano /etc/fstab


    Add the following line at the end of the file:



    /dev/sda3  /media/data  ext4 defaults  0  2


    Press Ctrl+o and then hit Enter



    Press Ctrl+x



    Close the terminal and reboot. You will be able to write to your mounted partition now without root-privileges.



    Note



    On german keyboards the Ctrl-key should be the left Strg-key.



    Explanation



    It looks like you mounted the partition via the desktop-icon or opening the partition in the file-manager. Doing so will automatically create the directory /media/<username>/<partition-name>, the partition-name might be the label of the partition (if one exists) or the UUID of the partition.



    This automatically created folder should be owned by and you should have read- and write-permissions, but mysteriously this doesn't seems to be the case. Also, this folder will be removed as soon as the partition is unmounted, if you don't unmount the partition yourself, the partition will be unmounted whenever the system shuts down. This explains that any changes (ownership, permissions) will not survive a reboot.



    To ship around this we create a directory which we use as mount-point, adjust ownership and permissions of the directory and at last we add an entry to the fstab-file, so the partition will be auto-mounted at start-up. This directory is not going to be removed when the partition is unmounted.



    Addition



    I also have the impression that you wanted to set up your installation with a separate /home-partition. It seems you created the partition, but you didn't specify the mount-point (which would be /home) during installation. As the result you got a system with your system-partition and a big, but empty partition. Don't worry, you still can achieve this by copying the contents of the /home-folder to the partition and after doing so changing the mount-point of the partition to /home, here is a nice "How to do that":



    https://help.ubuntu.com/community/Partitioning/Home/Moving






    share|improve this answer























    • Thanks, this really solved my problem. I have already copied my home-folder which seems to work fine. If I have any problems with that, I'll have a look at that link. Thanks for the additional info.
      – user293817
      May 4 '17 at 20:23










    • You're welcome, would have answered in German, but we have to keep it in English here.
      – mook765
      May 4 '17 at 21:21













    up vote
    1
    down vote



    accepted







    up vote
    1
    down vote



    accepted






    First create a mount-point:



    sudo mkdir /media/data


    Change the ownership of the mount-point:



    sudo chown johanna: /media/data


    Set the permissions:



    sudo chmod 755 /media/data


    Now open the fstab-file:



    sudo nano /etc/fstab


    Add the following line at the end of the file:



    /dev/sda3  /media/data  ext4 defaults  0  2


    Press Ctrl+o and then hit Enter



    Press Ctrl+x



    Close the terminal and reboot. You will be able to write to your mounted partition now without root-privileges.



    Note



    On german keyboards the Ctrl-key should be the left Strg-key.



    Explanation



    It looks like you mounted the partition via the desktop-icon or opening the partition in the file-manager. Doing so will automatically create the directory /media/<username>/<partition-name>, the partition-name might be the label of the partition (if one exists) or the UUID of the partition.



    This automatically created folder should be owned by and you should have read- and write-permissions, but mysteriously this doesn't seems to be the case. Also, this folder will be removed as soon as the partition is unmounted, if you don't unmount the partition yourself, the partition will be unmounted whenever the system shuts down. This explains that any changes (ownership, permissions) will not survive a reboot.



    To ship around this we create a directory which we use as mount-point, adjust ownership and permissions of the directory and at last we add an entry to the fstab-file, so the partition will be auto-mounted at start-up. This directory is not going to be removed when the partition is unmounted.



    Addition



    I also have the impression that you wanted to set up your installation with a separate /home-partition. It seems you created the partition, but you didn't specify the mount-point (which would be /home) during installation. As the result you got a system with your system-partition and a big, but empty partition. Don't worry, you still can achieve this by copying the contents of the /home-folder to the partition and after doing so changing the mount-point of the partition to /home, here is a nice "How to do that":



    https://help.ubuntu.com/community/Partitioning/Home/Moving






    share|improve this answer














    First create a mount-point:



    sudo mkdir /media/data


    Change the ownership of the mount-point:



    sudo chown johanna: /media/data


    Set the permissions:



    sudo chmod 755 /media/data


    Now open the fstab-file:



    sudo nano /etc/fstab


    Add the following line at the end of the file:



    /dev/sda3  /media/data  ext4 defaults  0  2


    Press Ctrl+o and then hit Enter



    Press Ctrl+x



    Close the terminal and reboot. You will be able to write to your mounted partition now without root-privileges.



    Note



    On german keyboards the Ctrl-key should be the left Strg-key.



    Explanation



    It looks like you mounted the partition via the desktop-icon or opening the partition in the file-manager. Doing so will automatically create the directory /media/<username>/<partition-name>, the partition-name might be the label of the partition (if one exists) or the UUID of the partition.



    This automatically created folder should be owned by and you should have read- and write-permissions, but mysteriously this doesn't seems to be the case. Also, this folder will be removed as soon as the partition is unmounted, if you don't unmount the partition yourself, the partition will be unmounted whenever the system shuts down. This explains that any changes (ownership, permissions) will not survive a reboot.



    To ship around this we create a directory which we use as mount-point, adjust ownership and permissions of the directory and at last we add an entry to the fstab-file, so the partition will be auto-mounted at start-up. This directory is not going to be removed when the partition is unmounted.



    Addition



    I also have the impression that you wanted to set up your installation with a separate /home-partition. It seems you created the partition, but you didn't specify the mount-point (which would be /home) during installation. As the result you got a system with your system-partition and a big, but empty partition. Don't worry, you still can achieve this by copying the contents of the /home-folder to the partition and after doing so changing the mount-point of the partition to /home, here is a nice "How to do that":



    https://help.ubuntu.com/community/Partitioning/Home/Moving







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited May 4 '17 at 11:26

























    answered May 2 '17 at 23:52









    mook765

    3,70921330




    3,70921330












    • Thanks, this really solved my problem. I have already copied my home-folder which seems to work fine. If I have any problems with that, I'll have a look at that link. Thanks for the additional info.
      – user293817
      May 4 '17 at 20:23










    • You're welcome, would have answered in German, but we have to keep it in English here.
      – mook765
      May 4 '17 at 21:21


















    • Thanks, this really solved my problem. I have already copied my home-folder which seems to work fine. If I have any problems with that, I'll have a look at that link. Thanks for the additional info.
      – user293817
      May 4 '17 at 20:23










    • You're welcome, would have answered in German, but we have to keep it in English here.
      – mook765
      May 4 '17 at 21:21
















    Thanks, this really solved my problem. I have already copied my home-folder which seems to work fine. If I have any problems with that, I'll have a look at that link. Thanks for the additional info.
    – user293817
    May 4 '17 at 20:23




    Thanks, this really solved my problem. I have already copied my home-folder which seems to work fine. If I have any problems with that, I'll have a look at that link. Thanks for the additional info.
    – user293817
    May 4 '17 at 20:23












    You're welcome, would have answered in German, but we have to keep it in English here.
    – mook765
    May 4 '17 at 21:21




    You're welcome, would have answered in German, but we have to keep it in English here.
    – mook765
    May 4 '17 at 21:21












    up vote
    0
    down vote













    That a normal user can't write to a newly created partition is perfectly normal. That root can't access it, though, isn't.



    First off: Mount the partition. You will learn why below.



    Your mount point should have these permissions, owner, and group:



    drwxr-xr-x  25 root root


    Navigate to the folder where your mount point is. So if your mount point is /media/john/data, navigate to /media/john in the terminal. Then execute ll. You can get it to have the properties mentioned above by executing these commands:



    sudo chown root data
    sudo chgrp root data
    sudo chmod 751 data


    You, however, want access for yourself. So swap root in the first 2 lines out for your own user name:



    sudo chown john data
    sudo chgrp john data
    sudo chmod 751 data


    You have to execute these commands when the partition is mounted. When the partition is mounted, these commands modify the properties of the root of the file system of the mounted partition. If nothing is mounted in that folder, the commands modify the properties of the folder on the FS mounted in /media/john (probably the same one as in / on your system). You don't want this.






    share|improve this answer





















    • this only helps for the time being. when i unmount the partition and mount it again, I've got the same problem as before.
      – user293817
      May 2 '17 at 22:20










    • This seems weird. To make sure it's not a bug in Nautilus, please check whether the permissions change back after unmounting and remounting. You can mount via sudo mount /dev/sda3 /media/john/data and unmount via sudo umount /dev/sda3. Note that it's umount, not unmount. Please also test whether you can write to the FS from the command line. This command should create a new file whose name is the current date and time. I can't post it here directly because markdown formatting won't work with it. That's why I use a pastebin link.
      – UTF-8
      May 3 '17 at 12:15















    up vote
    0
    down vote













    That a normal user can't write to a newly created partition is perfectly normal. That root can't access it, though, isn't.



    First off: Mount the partition. You will learn why below.



    Your mount point should have these permissions, owner, and group:



    drwxr-xr-x  25 root root


    Navigate to the folder where your mount point is. So if your mount point is /media/john/data, navigate to /media/john in the terminal. Then execute ll. You can get it to have the properties mentioned above by executing these commands:



    sudo chown root data
    sudo chgrp root data
    sudo chmod 751 data


    You, however, want access for yourself. So swap root in the first 2 lines out for your own user name:



    sudo chown john data
    sudo chgrp john data
    sudo chmod 751 data


    You have to execute these commands when the partition is mounted. When the partition is mounted, these commands modify the properties of the root of the file system of the mounted partition. If nothing is mounted in that folder, the commands modify the properties of the folder on the FS mounted in /media/john (probably the same one as in / on your system). You don't want this.






    share|improve this answer





















    • this only helps for the time being. when i unmount the partition and mount it again, I've got the same problem as before.
      – user293817
      May 2 '17 at 22:20










    • This seems weird. To make sure it's not a bug in Nautilus, please check whether the permissions change back after unmounting and remounting. You can mount via sudo mount /dev/sda3 /media/john/data and unmount via sudo umount /dev/sda3. Note that it's umount, not unmount. Please also test whether you can write to the FS from the command line. This command should create a new file whose name is the current date and time. I can't post it here directly because markdown formatting won't work with it. That's why I use a pastebin link.
      – UTF-8
      May 3 '17 at 12:15













    up vote
    0
    down vote










    up vote
    0
    down vote









    That a normal user can't write to a newly created partition is perfectly normal. That root can't access it, though, isn't.



    First off: Mount the partition. You will learn why below.



    Your mount point should have these permissions, owner, and group:



    drwxr-xr-x  25 root root


    Navigate to the folder where your mount point is. So if your mount point is /media/john/data, navigate to /media/john in the terminal. Then execute ll. You can get it to have the properties mentioned above by executing these commands:



    sudo chown root data
    sudo chgrp root data
    sudo chmod 751 data


    You, however, want access for yourself. So swap root in the first 2 lines out for your own user name:



    sudo chown john data
    sudo chgrp john data
    sudo chmod 751 data


    You have to execute these commands when the partition is mounted. When the partition is mounted, these commands modify the properties of the root of the file system of the mounted partition. If nothing is mounted in that folder, the commands modify the properties of the folder on the FS mounted in /media/john (probably the same one as in / on your system). You don't want this.






    share|improve this answer












    That a normal user can't write to a newly created partition is perfectly normal. That root can't access it, though, isn't.



    First off: Mount the partition. You will learn why below.



    Your mount point should have these permissions, owner, and group:



    drwxr-xr-x  25 root root


    Navigate to the folder where your mount point is. So if your mount point is /media/john/data, navigate to /media/john in the terminal. Then execute ll. You can get it to have the properties mentioned above by executing these commands:



    sudo chown root data
    sudo chgrp root data
    sudo chmod 751 data


    You, however, want access for yourself. So swap root in the first 2 lines out for your own user name:



    sudo chown john data
    sudo chgrp john data
    sudo chmod 751 data


    You have to execute these commands when the partition is mounted. When the partition is mounted, these commands modify the properties of the root of the file system of the mounted partition. If nothing is mounted in that folder, the commands modify the properties of the folder on the FS mounted in /media/john (probably the same one as in / on your system). You don't want this.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered May 2 '17 at 19:05









    UTF-8

    3,62352049




    3,62352049












    • this only helps for the time being. when i unmount the partition and mount it again, I've got the same problem as before.
      – user293817
      May 2 '17 at 22:20










    • This seems weird. To make sure it's not a bug in Nautilus, please check whether the permissions change back after unmounting and remounting. You can mount via sudo mount /dev/sda3 /media/john/data and unmount via sudo umount /dev/sda3. Note that it's umount, not unmount. Please also test whether you can write to the FS from the command line. This command should create a new file whose name is the current date and time. I can't post it here directly because markdown formatting won't work with it. That's why I use a pastebin link.
      – UTF-8
      May 3 '17 at 12:15


















    • this only helps for the time being. when i unmount the partition and mount it again, I've got the same problem as before.
      – user293817
      May 2 '17 at 22:20










    • This seems weird. To make sure it's not a bug in Nautilus, please check whether the permissions change back after unmounting and remounting. You can mount via sudo mount /dev/sda3 /media/john/data and unmount via sudo umount /dev/sda3. Note that it's umount, not unmount. Please also test whether you can write to the FS from the command line. This command should create a new file whose name is the current date and time. I can't post it here directly because markdown formatting won't work with it. That's why I use a pastebin link.
      – UTF-8
      May 3 '17 at 12:15
















    this only helps for the time being. when i unmount the partition and mount it again, I've got the same problem as before.
    – user293817
    May 2 '17 at 22:20




    this only helps for the time being. when i unmount the partition and mount it again, I've got the same problem as before.
    – user293817
    May 2 '17 at 22:20












    This seems weird. To make sure it's not a bug in Nautilus, please check whether the permissions change back after unmounting and remounting. You can mount via sudo mount /dev/sda3 /media/john/data and unmount via sudo umount /dev/sda3. Note that it's umount, not unmount. Please also test whether you can write to the FS from the command line. This command should create a new file whose name is the current date and time. I can't post it here directly because markdown formatting won't work with it. That's why I use a pastebin link.
    – UTF-8
    May 3 '17 at 12:15




    This seems weird. To make sure it's not a bug in Nautilus, please check whether the permissions change back after unmounting and remounting. You can mount via sudo mount /dev/sda3 /media/john/data and unmount via sudo umount /dev/sda3. Note that it's umount, not unmount. Please also test whether you can write to the FS from the command line. This command should create a new file whose name is the current date and time. I can't post it here directly because markdown formatting won't work with it. That's why I use a pastebin link.
    – UTF-8
    May 3 '17 at 12:15










    up vote
    0
    down vote













    I think I have a much, much easier way to achieve this (for GUI users), and re-mounting it does work with same permissions. I do everything with Nautilus. Normally the new partition will appear in the left side of Nautilus, and one can click it to mount it, right? For this procedure you start Nautilus as root user, I do this with "gksudo nautilus" (Tip; assign a key combination in system settings, keyboard, custom). Type root password in the dialog. Then mount the drive, click properties, and go to the rights tab (don't know the exact term because my system is in dutch), and change to your preferences. That's it.



    If this is not working for you I would remove the partition in GParted and re-create it, and try again, since you have applied several operation on it that maybe could interfere.






    share|improve this answer



























      up vote
      0
      down vote













      I think I have a much, much easier way to achieve this (for GUI users), and re-mounting it does work with same permissions. I do everything with Nautilus. Normally the new partition will appear in the left side of Nautilus, and one can click it to mount it, right? For this procedure you start Nautilus as root user, I do this with "gksudo nautilus" (Tip; assign a key combination in system settings, keyboard, custom). Type root password in the dialog. Then mount the drive, click properties, and go to the rights tab (don't know the exact term because my system is in dutch), and change to your preferences. That's it.



      If this is not working for you I would remove the partition in GParted and re-create it, and try again, since you have applied several operation on it that maybe could interfere.






      share|improve this answer

























        up vote
        0
        down vote










        up vote
        0
        down vote









        I think I have a much, much easier way to achieve this (for GUI users), and re-mounting it does work with same permissions. I do everything with Nautilus. Normally the new partition will appear in the left side of Nautilus, and one can click it to mount it, right? For this procedure you start Nautilus as root user, I do this with "gksudo nautilus" (Tip; assign a key combination in system settings, keyboard, custom). Type root password in the dialog. Then mount the drive, click properties, and go to the rights tab (don't know the exact term because my system is in dutch), and change to your preferences. That's it.



        If this is not working for you I would remove the partition in GParted and re-create it, and try again, since you have applied several operation on it that maybe could interfere.






        share|improve this answer














        I think I have a much, much easier way to achieve this (for GUI users), and re-mounting it does work with same permissions. I do everything with Nautilus. Normally the new partition will appear in the left side of Nautilus, and one can click it to mount it, right? For this procedure you start Nautilus as root user, I do this with "gksudo nautilus" (Tip; assign a key combination in system settings, keyboard, custom). Type root password in the dialog. Then mount the drive, click properties, and go to the rights tab (don't know the exact term because my system is in dutch), and change to your preferences. That's it.



        If this is not working for you I would remove the partition in GParted and re-create it, and try again, since you have applied several operation on it that maybe could interfere.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Dec 1 at 12:44

























        answered Dec 1 at 12:39









        Marcellus

        14917




        14917






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f911187%2fnew-partition-only-root-has-rw-rights%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Quarter-circle Tiles

            build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

            Mont Emei