can't do anything on sda1 permission denied












0















Main system is on sdb (ssd). Got an HDD on sda1 (that's the partition I want to use), but getting permission denied when doing anything on it. Want it to be mounted and ready for use each time I boot the computer like it's regular space for downloading stuff.



Lubuntu 18.04.2



NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda 8:0 0 465.8G 0 disk
└─sda1 8:1 0 436G 0 part
sdb 8:16 0 74.5G 0 disk
├─sdb1 8:17 0 512M 0 part /boot/efi
└─sdb2 8:18 0 74G 0 part /
sr0 11:0 1 1024M 0 rom









share|improve this question

























  • Providing more details may help us to help you. How are you trying to mount it when you get the permission-denied error? If you're doing it from a command line, please provide command & error-message-output. Did you use sudo to elevate permissions? If done via gui, what tool did you use to perform mount, what type of file system is on the drive? We only know what you tell us...

    – guiverc
    Mar 20 at 5:24











  • I just click on the partition in PCManFM. When I create a new folder, I get an error. I want read/write functionality in this fashion to work on boot.

    – primuspaul
    Mar 20 at 5:26











  • Where are you trying to create the new folder, if it's in $HOME (ie. your /home/user/ directory) you have permissions, however if it's elsewhere in the file-system you need to elevate permissions (eg. sudo mkdir /my_new_mount_dir if using command). Details provided by you help us to understand your issue & help you more directly. If you want it to mount directly, I'd suggest adding an entry in /etc/fstab (your system's file-system table) but more details are necessary for full details needed (eg. lsblk will list devices, I'd suggest using UUID= detail in entry)

    – guiverc
    Mar 20 at 5:46











  • So I can never do anything outside home w/o root? But I modify files on a USB flash drive all the time w/o root. Or are you saying fstab will fix this?

    – primuspaul
    Mar 20 at 6:00













  • You need to have a directory first in order to mount to it, that will require sudo or elevated-privileges unless it's auto-mounted like you're probably doing already with the thumb-drives. Its needed only to create the directory, then edit the fstab file & setup your configuration; it won't be necessary to use it (as you can give your $USER read/write permissions to the directory after creation).

    – guiverc
    Mar 20 at 6:06
















0















Main system is on sdb (ssd). Got an HDD on sda1 (that's the partition I want to use), but getting permission denied when doing anything on it. Want it to be mounted and ready for use each time I boot the computer like it's regular space for downloading stuff.



Lubuntu 18.04.2



NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda 8:0 0 465.8G 0 disk
└─sda1 8:1 0 436G 0 part
sdb 8:16 0 74.5G 0 disk
├─sdb1 8:17 0 512M 0 part /boot/efi
└─sdb2 8:18 0 74G 0 part /
sr0 11:0 1 1024M 0 rom









share|improve this question

























  • Providing more details may help us to help you. How are you trying to mount it when you get the permission-denied error? If you're doing it from a command line, please provide command & error-message-output. Did you use sudo to elevate permissions? If done via gui, what tool did you use to perform mount, what type of file system is on the drive? We only know what you tell us...

    – guiverc
    Mar 20 at 5:24











  • I just click on the partition in PCManFM. When I create a new folder, I get an error. I want read/write functionality in this fashion to work on boot.

    – primuspaul
    Mar 20 at 5:26











  • Where are you trying to create the new folder, if it's in $HOME (ie. your /home/user/ directory) you have permissions, however if it's elsewhere in the file-system you need to elevate permissions (eg. sudo mkdir /my_new_mount_dir if using command). Details provided by you help us to understand your issue & help you more directly. If you want it to mount directly, I'd suggest adding an entry in /etc/fstab (your system's file-system table) but more details are necessary for full details needed (eg. lsblk will list devices, I'd suggest using UUID= detail in entry)

    – guiverc
    Mar 20 at 5:46











  • So I can never do anything outside home w/o root? But I modify files on a USB flash drive all the time w/o root. Or are you saying fstab will fix this?

    – primuspaul
    Mar 20 at 6:00













  • You need to have a directory first in order to mount to it, that will require sudo or elevated-privileges unless it's auto-mounted like you're probably doing already with the thumb-drives. Its needed only to create the directory, then edit the fstab file & setup your configuration; it won't be necessary to use it (as you can give your $USER read/write permissions to the directory after creation).

    – guiverc
    Mar 20 at 6:06














0












0








0








Main system is on sdb (ssd). Got an HDD on sda1 (that's the partition I want to use), but getting permission denied when doing anything on it. Want it to be mounted and ready for use each time I boot the computer like it's regular space for downloading stuff.



Lubuntu 18.04.2



NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda 8:0 0 465.8G 0 disk
└─sda1 8:1 0 436G 0 part
sdb 8:16 0 74.5G 0 disk
├─sdb1 8:17 0 512M 0 part /boot/efi
└─sdb2 8:18 0 74G 0 part /
sr0 11:0 1 1024M 0 rom









share|improve this question
















Main system is on sdb (ssd). Got an HDD on sda1 (that's the partition I want to use), but getting permission denied when doing anything on it. Want it to be mounted and ready for use each time I boot the computer like it's regular space for downloading stuff.



Lubuntu 18.04.2



NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda 8:0 0 465.8G 0 disk
└─sda1 8:1 0 436G 0 part
sdb 8:16 0 74.5G 0 disk
├─sdb1 8:17 0 512M 0 part /boot/efi
└─sdb2 8:18 0 74G 0 part /
sr0 11:0 1 1024M 0 rom






hard-drive






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 20 at 6:15







primuspaul

















asked Mar 20 at 5:14









primuspaulprimuspaul

184




184













  • Providing more details may help us to help you. How are you trying to mount it when you get the permission-denied error? If you're doing it from a command line, please provide command & error-message-output. Did you use sudo to elevate permissions? If done via gui, what tool did you use to perform mount, what type of file system is on the drive? We only know what you tell us...

    – guiverc
    Mar 20 at 5:24











  • I just click on the partition in PCManFM. When I create a new folder, I get an error. I want read/write functionality in this fashion to work on boot.

    – primuspaul
    Mar 20 at 5:26











  • Where are you trying to create the new folder, if it's in $HOME (ie. your /home/user/ directory) you have permissions, however if it's elsewhere in the file-system you need to elevate permissions (eg. sudo mkdir /my_new_mount_dir if using command). Details provided by you help us to understand your issue & help you more directly. If you want it to mount directly, I'd suggest adding an entry in /etc/fstab (your system's file-system table) but more details are necessary for full details needed (eg. lsblk will list devices, I'd suggest using UUID= detail in entry)

    – guiverc
    Mar 20 at 5:46











  • So I can never do anything outside home w/o root? But I modify files on a USB flash drive all the time w/o root. Or are you saying fstab will fix this?

    – primuspaul
    Mar 20 at 6:00













  • You need to have a directory first in order to mount to it, that will require sudo or elevated-privileges unless it's auto-mounted like you're probably doing already with the thumb-drives. Its needed only to create the directory, then edit the fstab file & setup your configuration; it won't be necessary to use it (as you can give your $USER read/write permissions to the directory after creation).

    – guiverc
    Mar 20 at 6:06



















  • Providing more details may help us to help you. How are you trying to mount it when you get the permission-denied error? If you're doing it from a command line, please provide command & error-message-output. Did you use sudo to elevate permissions? If done via gui, what tool did you use to perform mount, what type of file system is on the drive? We only know what you tell us...

    – guiverc
    Mar 20 at 5:24











  • I just click on the partition in PCManFM. When I create a new folder, I get an error. I want read/write functionality in this fashion to work on boot.

    – primuspaul
    Mar 20 at 5:26











  • Where are you trying to create the new folder, if it's in $HOME (ie. your /home/user/ directory) you have permissions, however if it's elsewhere in the file-system you need to elevate permissions (eg. sudo mkdir /my_new_mount_dir if using command). Details provided by you help us to understand your issue & help you more directly. If you want it to mount directly, I'd suggest adding an entry in /etc/fstab (your system's file-system table) but more details are necessary for full details needed (eg. lsblk will list devices, I'd suggest using UUID= detail in entry)

    – guiverc
    Mar 20 at 5:46











  • So I can never do anything outside home w/o root? But I modify files on a USB flash drive all the time w/o root. Or are you saying fstab will fix this?

    – primuspaul
    Mar 20 at 6:00













  • You need to have a directory first in order to mount to it, that will require sudo or elevated-privileges unless it's auto-mounted like you're probably doing already with the thumb-drives. Its needed only to create the directory, then edit the fstab file & setup your configuration; it won't be necessary to use it (as you can give your $USER read/write permissions to the directory after creation).

    – guiverc
    Mar 20 at 6:06

















Providing more details may help us to help you. How are you trying to mount it when you get the permission-denied error? If you're doing it from a command line, please provide command & error-message-output. Did you use sudo to elevate permissions? If done via gui, what tool did you use to perform mount, what type of file system is on the drive? We only know what you tell us...

– guiverc
Mar 20 at 5:24





Providing more details may help us to help you. How are you trying to mount it when you get the permission-denied error? If you're doing it from a command line, please provide command & error-message-output. Did you use sudo to elevate permissions? If done via gui, what tool did you use to perform mount, what type of file system is on the drive? We only know what you tell us...

– guiverc
Mar 20 at 5:24













I just click on the partition in PCManFM. When I create a new folder, I get an error. I want read/write functionality in this fashion to work on boot.

– primuspaul
Mar 20 at 5:26





I just click on the partition in PCManFM. When I create a new folder, I get an error. I want read/write functionality in this fashion to work on boot.

– primuspaul
Mar 20 at 5:26













Where are you trying to create the new folder, if it's in $HOME (ie. your /home/user/ directory) you have permissions, however if it's elsewhere in the file-system you need to elevate permissions (eg. sudo mkdir /my_new_mount_dir if using command). Details provided by you help us to understand your issue & help you more directly. If you want it to mount directly, I'd suggest adding an entry in /etc/fstab (your system's file-system table) but more details are necessary for full details needed (eg. lsblk will list devices, I'd suggest using UUID= detail in entry)

– guiverc
Mar 20 at 5:46





Where are you trying to create the new folder, if it's in $HOME (ie. your /home/user/ directory) you have permissions, however if it's elsewhere in the file-system you need to elevate permissions (eg. sudo mkdir /my_new_mount_dir if using command). Details provided by you help us to understand your issue & help you more directly. If you want it to mount directly, I'd suggest adding an entry in /etc/fstab (your system's file-system table) but more details are necessary for full details needed (eg. lsblk will list devices, I'd suggest using UUID= detail in entry)

– guiverc
Mar 20 at 5:46













So I can never do anything outside home w/o root? But I modify files on a USB flash drive all the time w/o root. Or are you saying fstab will fix this?

– primuspaul
Mar 20 at 6:00







So I can never do anything outside home w/o root? But I modify files on a USB flash drive all the time w/o root. Or are you saying fstab will fix this?

– primuspaul
Mar 20 at 6:00















You need to have a directory first in order to mount to it, that will require sudo or elevated-privileges unless it's auto-mounted like you're probably doing already with the thumb-drives. Its needed only to create the directory, then edit the fstab file & setup your configuration; it won't be necessary to use it (as you can give your $USER read/write permissions to the directory after creation).

– guiverc
Mar 20 at 6:06





You need to have a directory first in order to mount to it, that will require sudo or elevated-privileges unless it's auto-mounted like you're probably doing already with the thumb-drives. Its needed only to create the directory, then edit the fstab file & setup your configuration; it won't be necessary to use it (as you can give your $USER read/write permissions to the directory after creation).

– guiverc
Mar 20 at 6:06










2 Answers
2






active

oldest

votes


















0















  1. create a mount point you want to use



sudo mkdir /data




Where you create the directory is up to you, I have a few in my / (root) directory to save typing when I refer to them. 'data' is used as an example.




  1. get details of your drive/partitions



guiverc@d960-ubu2:~$   sudo blkid |grep UUID
/dev/sda1: UUID="afa7971f-3dd5-4b30-9c98-0af3e56a6f2b" TYPE="ext4" PARTUUID="6c8394c6-01"
/dev/sda2: UUID="4f59600e-1f6b-4e3a-a466-941a2168e327" TYPE="swap" PARTUUID="6c8394c6-02"
/dev/sda4: UUID="06863296-81b3-4263-8665-21f1864fa399" TYPE="xfs" PARTUUID="6c8394c6-04"
/dev/sda5: UUID="5b4267e5-8b90-4f6b-84b0-c4ee9d5e104d" TYPE="ext4" PARTUUID="6c8394c6-05"
/dev/sda6: UUID="ba0dca2e-0799-4340-b565-a649842c8a69" TYPE="xfs" PARTUUID="6c8394c6-06"
guiverc@d960-ubu2:~$ cat /etc/fstab|grep UUID
UUID=afa7971f-3dd5-4b30-9c98-0af3e56a6f2b / ext4 errors=remount-ro 0 1
UUID=06863296-81b3-4263-8665-21f1864fa399 /home xfs defaults 0 0
UUID=4f59600e-1f6b-4e3a-a466-941a2168e327 none swap sw 0 0



You'll note the detail for /sda6 (which I don't refer to by /dev/sda6 as those numbers can change if bios configuration is altered. partitioning changes, etc - I use the more precise UUID or unique-identifier for the partition.



The 'xfs' parameter you will need to change to reflect the type of file-system you are use for that partition, i use 'xfs' obviously, but you could say 'ext4' if that's what you use, or your type of fs. From man fstab some examples are :-




   The third field (fs_vfstype).
This field describes the type of the filesystem. Linux supports many filesystem types: ext4, xfs, btrfs, f2fs, vfat,
ntfs, hfsplus, tmpfs, sysfs, proc, iso9660, udf, squashfs, nfs, cifs, and many more. For more details, see mount(8).




  1. Add new entry to your file-system table (/etc/fstab)


You adjust what you learned in prior steps to your drive/partition entries. Your best examples of course will not be mine, but your own existing entries in /etc/fstab or your own file-system table. This will create a line you add below the already existing entries in your 'fstab' file. I'd also suggest adding a comment to it as to who made change, why, for example



# adding my /dev/sda6 so it'll automount - guiverc/2019-03
UUID=ba0dca2e-0799-4340-b565-a649842c8a69 /data xfs defaults 0 0


What editor you use to edit /etc/fstab to add the additional entry is up to you, but you'll need to elevate your privileges, for example sudo vim /etc/fstab. It can also be done by GUI, but I find commands far faster.



You can then test with sudo mount /data, and it should automount in subsequent boots.






share|improve this answer
























  • Thanks, though I must add another necessary step, since this procedure merely mounted the drive to /data. It did NOT make it so that I can do anything in it without elevated procedures. I had to run pcmanfm in sudo and change /data permissions to be capable of edited by Anyone. After that it seems to have started working.

    – primuspaul
    Mar 21 at 1:45











  • Is your filesystem a native of linux (eg. ext4 etc), or a foreign one (ntfs etc)? I didn't do it, but yes I may have sudo chown $USER /data/if necessary in testing. (but I recall it only being necessary for non-native file-systems..)

    – guiverc
    Mar 21 at 4:19











  • It's ext4 created with GParted on this OS

    – primuspaul
    Mar 21 at 4:36











  • If you're happy with answer; please accept. If you want me to add an additional step (sudo chown $USER /data) I can; I'm reluctant to only because I didn't require it on test (though I mounted nfs type)

    – guiverc
    Mar 21 at 4:53



















0














First you need to unmount it (Remember to use sudo)-



sudo umount /dev/sda1



Then you need to properly mount it but before that double-check



lsblk



Make sure this is the partition you want to mount



Create a directory in /mnt/ with your favorite name say 'sda1'



sudo mkdir /mnt/sda1



Now mount the partition to the directory



mount /dev/sda1/ /mnt/sda1






share|improve this answer
























  • sudo mount /dev/sda1/ /mnt/sda1 mount: /mnt/sda1: special device /dev/sda1/ does not exist (a path prefix is not a directory).

    – primuspaul
    Mar 20 at 5:31











  • There's an extra / after /dev/sda1

    – To Do
    Mar 21 at 2:28












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',
autoActivateHeartbeat: false,
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%2f1127112%2fcant-do-anything-on-sda1-permission-denied%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









0















  1. create a mount point you want to use



sudo mkdir /data




Where you create the directory is up to you, I have a few in my / (root) directory to save typing when I refer to them. 'data' is used as an example.




  1. get details of your drive/partitions



guiverc@d960-ubu2:~$   sudo blkid |grep UUID
/dev/sda1: UUID="afa7971f-3dd5-4b30-9c98-0af3e56a6f2b" TYPE="ext4" PARTUUID="6c8394c6-01"
/dev/sda2: UUID="4f59600e-1f6b-4e3a-a466-941a2168e327" TYPE="swap" PARTUUID="6c8394c6-02"
/dev/sda4: UUID="06863296-81b3-4263-8665-21f1864fa399" TYPE="xfs" PARTUUID="6c8394c6-04"
/dev/sda5: UUID="5b4267e5-8b90-4f6b-84b0-c4ee9d5e104d" TYPE="ext4" PARTUUID="6c8394c6-05"
/dev/sda6: UUID="ba0dca2e-0799-4340-b565-a649842c8a69" TYPE="xfs" PARTUUID="6c8394c6-06"
guiverc@d960-ubu2:~$ cat /etc/fstab|grep UUID
UUID=afa7971f-3dd5-4b30-9c98-0af3e56a6f2b / ext4 errors=remount-ro 0 1
UUID=06863296-81b3-4263-8665-21f1864fa399 /home xfs defaults 0 0
UUID=4f59600e-1f6b-4e3a-a466-941a2168e327 none swap sw 0 0



You'll note the detail for /sda6 (which I don't refer to by /dev/sda6 as those numbers can change if bios configuration is altered. partitioning changes, etc - I use the more precise UUID or unique-identifier for the partition.



The 'xfs' parameter you will need to change to reflect the type of file-system you are use for that partition, i use 'xfs' obviously, but you could say 'ext4' if that's what you use, or your type of fs. From man fstab some examples are :-




   The third field (fs_vfstype).
This field describes the type of the filesystem. Linux supports many filesystem types: ext4, xfs, btrfs, f2fs, vfat,
ntfs, hfsplus, tmpfs, sysfs, proc, iso9660, udf, squashfs, nfs, cifs, and many more. For more details, see mount(8).




  1. Add new entry to your file-system table (/etc/fstab)


You adjust what you learned in prior steps to your drive/partition entries. Your best examples of course will not be mine, but your own existing entries in /etc/fstab or your own file-system table. This will create a line you add below the already existing entries in your 'fstab' file. I'd also suggest adding a comment to it as to who made change, why, for example



# adding my /dev/sda6 so it'll automount - guiverc/2019-03
UUID=ba0dca2e-0799-4340-b565-a649842c8a69 /data xfs defaults 0 0


What editor you use to edit /etc/fstab to add the additional entry is up to you, but you'll need to elevate your privileges, for example sudo vim /etc/fstab. It can also be done by GUI, but I find commands far faster.



You can then test with sudo mount /data, and it should automount in subsequent boots.






share|improve this answer
























  • Thanks, though I must add another necessary step, since this procedure merely mounted the drive to /data. It did NOT make it so that I can do anything in it without elevated procedures. I had to run pcmanfm in sudo and change /data permissions to be capable of edited by Anyone. After that it seems to have started working.

    – primuspaul
    Mar 21 at 1:45











  • Is your filesystem a native of linux (eg. ext4 etc), or a foreign one (ntfs etc)? I didn't do it, but yes I may have sudo chown $USER /data/if necessary in testing. (but I recall it only being necessary for non-native file-systems..)

    – guiverc
    Mar 21 at 4:19











  • It's ext4 created with GParted on this OS

    – primuspaul
    Mar 21 at 4:36











  • If you're happy with answer; please accept. If you want me to add an additional step (sudo chown $USER /data) I can; I'm reluctant to only because I didn't require it on test (though I mounted nfs type)

    – guiverc
    Mar 21 at 4:53
















0















  1. create a mount point you want to use



sudo mkdir /data




Where you create the directory is up to you, I have a few in my / (root) directory to save typing when I refer to them. 'data' is used as an example.




  1. get details of your drive/partitions



guiverc@d960-ubu2:~$   sudo blkid |grep UUID
/dev/sda1: UUID="afa7971f-3dd5-4b30-9c98-0af3e56a6f2b" TYPE="ext4" PARTUUID="6c8394c6-01"
/dev/sda2: UUID="4f59600e-1f6b-4e3a-a466-941a2168e327" TYPE="swap" PARTUUID="6c8394c6-02"
/dev/sda4: UUID="06863296-81b3-4263-8665-21f1864fa399" TYPE="xfs" PARTUUID="6c8394c6-04"
/dev/sda5: UUID="5b4267e5-8b90-4f6b-84b0-c4ee9d5e104d" TYPE="ext4" PARTUUID="6c8394c6-05"
/dev/sda6: UUID="ba0dca2e-0799-4340-b565-a649842c8a69" TYPE="xfs" PARTUUID="6c8394c6-06"
guiverc@d960-ubu2:~$ cat /etc/fstab|grep UUID
UUID=afa7971f-3dd5-4b30-9c98-0af3e56a6f2b / ext4 errors=remount-ro 0 1
UUID=06863296-81b3-4263-8665-21f1864fa399 /home xfs defaults 0 0
UUID=4f59600e-1f6b-4e3a-a466-941a2168e327 none swap sw 0 0



You'll note the detail for /sda6 (which I don't refer to by /dev/sda6 as those numbers can change if bios configuration is altered. partitioning changes, etc - I use the more precise UUID or unique-identifier for the partition.



The 'xfs' parameter you will need to change to reflect the type of file-system you are use for that partition, i use 'xfs' obviously, but you could say 'ext4' if that's what you use, or your type of fs. From man fstab some examples are :-




   The third field (fs_vfstype).
This field describes the type of the filesystem. Linux supports many filesystem types: ext4, xfs, btrfs, f2fs, vfat,
ntfs, hfsplus, tmpfs, sysfs, proc, iso9660, udf, squashfs, nfs, cifs, and many more. For more details, see mount(8).




  1. Add new entry to your file-system table (/etc/fstab)


You adjust what you learned in prior steps to your drive/partition entries. Your best examples of course will not be mine, but your own existing entries in /etc/fstab or your own file-system table. This will create a line you add below the already existing entries in your 'fstab' file. I'd also suggest adding a comment to it as to who made change, why, for example



# adding my /dev/sda6 so it'll automount - guiverc/2019-03
UUID=ba0dca2e-0799-4340-b565-a649842c8a69 /data xfs defaults 0 0


What editor you use to edit /etc/fstab to add the additional entry is up to you, but you'll need to elevate your privileges, for example sudo vim /etc/fstab. It can also be done by GUI, but I find commands far faster.



You can then test with sudo mount /data, and it should automount in subsequent boots.






share|improve this answer
























  • Thanks, though I must add another necessary step, since this procedure merely mounted the drive to /data. It did NOT make it so that I can do anything in it without elevated procedures. I had to run pcmanfm in sudo and change /data permissions to be capable of edited by Anyone. After that it seems to have started working.

    – primuspaul
    Mar 21 at 1:45











  • Is your filesystem a native of linux (eg. ext4 etc), or a foreign one (ntfs etc)? I didn't do it, but yes I may have sudo chown $USER /data/if necessary in testing. (but I recall it only being necessary for non-native file-systems..)

    – guiverc
    Mar 21 at 4:19











  • It's ext4 created with GParted on this OS

    – primuspaul
    Mar 21 at 4:36











  • If you're happy with answer; please accept. If you want me to add an additional step (sudo chown $USER /data) I can; I'm reluctant to only because I didn't require it on test (though I mounted nfs type)

    – guiverc
    Mar 21 at 4:53














0












0








0








  1. create a mount point you want to use



sudo mkdir /data




Where you create the directory is up to you, I have a few in my / (root) directory to save typing when I refer to them. 'data' is used as an example.




  1. get details of your drive/partitions



guiverc@d960-ubu2:~$   sudo blkid |grep UUID
/dev/sda1: UUID="afa7971f-3dd5-4b30-9c98-0af3e56a6f2b" TYPE="ext4" PARTUUID="6c8394c6-01"
/dev/sda2: UUID="4f59600e-1f6b-4e3a-a466-941a2168e327" TYPE="swap" PARTUUID="6c8394c6-02"
/dev/sda4: UUID="06863296-81b3-4263-8665-21f1864fa399" TYPE="xfs" PARTUUID="6c8394c6-04"
/dev/sda5: UUID="5b4267e5-8b90-4f6b-84b0-c4ee9d5e104d" TYPE="ext4" PARTUUID="6c8394c6-05"
/dev/sda6: UUID="ba0dca2e-0799-4340-b565-a649842c8a69" TYPE="xfs" PARTUUID="6c8394c6-06"
guiverc@d960-ubu2:~$ cat /etc/fstab|grep UUID
UUID=afa7971f-3dd5-4b30-9c98-0af3e56a6f2b / ext4 errors=remount-ro 0 1
UUID=06863296-81b3-4263-8665-21f1864fa399 /home xfs defaults 0 0
UUID=4f59600e-1f6b-4e3a-a466-941a2168e327 none swap sw 0 0



You'll note the detail for /sda6 (which I don't refer to by /dev/sda6 as those numbers can change if bios configuration is altered. partitioning changes, etc - I use the more precise UUID or unique-identifier for the partition.



The 'xfs' parameter you will need to change to reflect the type of file-system you are use for that partition, i use 'xfs' obviously, but you could say 'ext4' if that's what you use, or your type of fs. From man fstab some examples are :-




   The third field (fs_vfstype).
This field describes the type of the filesystem. Linux supports many filesystem types: ext4, xfs, btrfs, f2fs, vfat,
ntfs, hfsplus, tmpfs, sysfs, proc, iso9660, udf, squashfs, nfs, cifs, and many more. For more details, see mount(8).




  1. Add new entry to your file-system table (/etc/fstab)


You adjust what you learned in prior steps to your drive/partition entries. Your best examples of course will not be mine, but your own existing entries in /etc/fstab or your own file-system table. This will create a line you add below the already existing entries in your 'fstab' file. I'd also suggest adding a comment to it as to who made change, why, for example



# adding my /dev/sda6 so it'll automount - guiverc/2019-03
UUID=ba0dca2e-0799-4340-b565-a649842c8a69 /data xfs defaults 0 0


What editor you use to edit /etc/fstab to add the additional entry is up to you, but you'll need to elevate your privileges, for example sudo vim /etc/fstab. It can also be done by GUI, but I find commands far faster.



You can then test with sudo mount /data, and it should automount in subsequent boots.






share|improve this answer














  1. create a mount point you want to use



sudo mkdir /data




Where you create the directory is up to you, I have a few in my / (root) directory to save typing when I refer to them. 'data' is used as an example.




  1. get details of your drive/partitions



guiverc@d960-ubu2:~$   sudo blkid |grep UUID
/dev/sda1: UUID="afa7971f-3dd5-4b30-9c98-0af3e56a6f2b" TYPE="ext4" PARTUUID="6c8394c6-01"
/dev/sda2: UUID="4f59600e-1f6b-4e3a-a466-941a2168e327" TYPE="swap" PARTUUID="6c8394c6-02"
/dev/sda4: UUID="06863296-81b3-4263-8665-21f1864fa399" TYPE="xfs" PARTUUID="6c8394c6-04"
/dev/sda5: UUID="5b4267e5-8b90-4f6b-84b0-c4ee9d5e104d" TYPE="ext4" PARTUUID="6c8394c6-05"
/dev/sda6: UUID="ba0dca2e-0799-4340-b565-a649842c8a69" TYPE="xfs" PARTUUID="6c8394c6-06"
guiverc@d960-ubu2:~$ cat /etc/fstab|grep UUID
UUID=afa7971f-3dd5-4b30-9c98-0af3e56a6f2b / ext4 errors=remount-ro 0 1
UUID=06863296-81b3-4263-8665-21f1864fa399 /home xfs defaults 0 0
UUID=4f59600e-1f6b-4e3a-a466-941a2168e327 none swap sw 0 0



You'll note the detail for /sda6 (which I don't refer to by /dev/sda6 as those numbers can change if bios configuration is altered. partitioning changes, etc - I use the more precise UUID or unique-identifier for the partition.



The 'xfs' parameter you will need to change to reflect the type of file-system you are use for that partition, i use 'xfs' obviously, but you could say 'ext4' if that's what you use, or your type of fs. From man fstab some examples are :-




   The third field (fs_vfstype).
This field describes the type of the filesystem. Linux supports many filesystem types: ext4, xfs, btrfs, f2fs, vfat,
ntfs, hfsplus, tmpfs, sysfs, proc, iso9660, udf, squashfs, nfs, cifs, and many more. For more details, see mount(8).




  1. Add new entry to your file-system table (/etc/fstab)


You adjust what you learned in prior steps to your drive/partition entries. Your best examples of course will not be mine, but your own existing entries in /etc/fstab or your own file-system table. This will create a line you add below the already existing entries in your 'fstab' file. I'd also suggest adding a comment to it as to who made change, why, for example



# adding my /dev/sda6 so it'll automount - guiverc/2019-03
UUID=ba0dca2e-0799-4340-b565-a649842c8a69 /data xfs defaults 0 0


What editor you use to edit /etc/fstab to add the additional entry is up to you, but you'll need to elevate your privileges, for example sudo vim /etc/fstab. It can also be done by GUI, but I find commands far faster.



You can then test with sudo mount /data, and it should automount in subsequent boots.







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 21 at 0:07









guivercguiverc

5,08121723




5,08121723













  • Thanks, though I must add another necessary step, since this procedure merely mounted the drive to /data. It did NOT make it so that I can do anything in it without elevated procedures. I had to run pcmanfm in sudo and change /data permissions to be capable of edited by Anyone. After that it seems to have started working.

    – primuspaul
    Mar 21 at 1:45











  • Is your filesystem a native of linux (eg. ext4 etc), or a foreign one (ntfs etc)? I didn't do it, but yes I may have sudo chown $USER /data/if necessary in testing. (but I recall it only being necessary for non-native file-systems..)

    – guiverc
    Mar 21 at 4:19











  • It's ext4 created with GParted on this OS

    – primuspaul
    Mar 21 at 4:36











  • If you're happy with answer; please accept. If you want me to add an additional step (sudo chown $USER /data) I can; I'm reluctant to only because I didn't require it on test (though I mounted nfs type)

    – guiverc
    Mar 21 at 4:53



















  • Thanks, though I must add another necessary step, since this procedure merely mounted the drive to /data. It did NOT make it so that I can do anything in it without elevated procedures. I had to run pcmanfm in sudo and change /data permissions to be capable of edited by Anyone. After that it seems to have started working.

    – primuspaul
    Mar 21 at 1:45











  • Is your filesystem a native of linux (eg. ext4 etc), or a foreign one (ntfs etc)? I didn't do it, but yes I may have sudo chown $USER /data/if necessary in testing. (but I recall it only being necessary for non-native file-systems..)

    – guiverc
    Mar 21 at 4:19











  • It's ext4 created with GParted on this OS

    – primuspaul
    Mar 21 at 4:36











  • If you're happy with answer; please accept. If you want me to add an additional step (sudo chown $USER /data) I can; I'm reluctant to only because I didn't require it on test (though I mounted nfs type)

    – guiverc
    Mar 21 at 4:53

















Thanks, though I must add another necessary step, since this procedure merely mounted the drive to /data. It did NOT make it so that I can do anything in it without elevated procedures. I had to run pcmanfm in sudo and change /data permissions to be capable of edited by Anyone. After that it seems to have started working.

– primuspaul
Mar 21 at 1:45





Thanks, though I must add another necessary step, since this procedure merely mounted the drive to /data. It did NOT make it so that I can do anything in it without elevated procedures. I had to run pcmanfm in sudo and change /data permissions to be capable of edited by Anyone. After that it seems to have started working.

– primuspaul
Mar 21 at 1:45













Is your filesystem a native of linux (eg. ext4 etc), or a foreign one (ntfs etc)? I didn't do it, but yes I may have sudo chown $USER /data/if necessary in testing. (but I recall it only being necessary for non-native file-systems..)

– guiverc
Mar 21 at 4:19





Is your filesystem a native of linux (eg. ext4 etc), or a foreign one (ntfs etc)? I didn't do it, but yes I may have sudo chown $USER /data/if necessary in testing. (but I recall it only being necessary for non-native file-systems..)

– guiverc
Mar 21 at 4:19













It's ext4 created with GParted on this OS

– primuspaul
Mar 21 at 4:36





It's ext4 created with GParted on this OS

– primuspaul
Mar 21 at 4:36













If you're happy with answer; please accept. If you want me to add an additional step (sudo chown $USER /data) I can; I'm reluctant to only because I didn't require it on test (though I mounted nfs type)

– guiverc
Mar 21 at 4:53





If you're happy with answer; please accept. If you want me to add an additional step (sudo chown $USER /data) I can; I'm reluctant to only because I didn't require it on test (though I mounted nfs type)

– guiverc
Mar 21 at 4:53













0














First you need to unmount it (Remember to use sudo)-



sudo umount /dev/sda1



Then you need to properly mount it but before that double-check



lsblk



Make sure this is the partition you want to mount



Create a directory in /mnt/ with your favorite name say 'sda1'



sudo mkdir /mnt/sda1



Now mount the partition to the directory



mount /dev/sda1/ /mnt/sda1






share|improve this answer
























  • sudo mount /dev/sda1/ /mnt/sda1 mount: /mnt/sda1: special device /dev/sda1/ does not exist (a path prefix is not a directory).

    – primuspaul
    Mar 20 at 5:31











  • There's an extra / after /dev/sda1

    – To Do
    Mar 21 at 2:28
















0














First you need to unmount it (Remember to use sudo)-



sudo umount /dev/sda1



Then you need to properly mount it but before that double-check



lsblk



Make sure this is the partition you want to mount



Create a directory in /mnt/ with your favorite name say 'sda1'



sudo mkdir /mnt/sda1



Now mount the partition to the directory



mount /dev/sda1/ /mnt/sda1






share|improve this answer
























  • sudo mount /dev/sda1/ /mnt/sda1 mount: /mnt/sda1: special device /dev/sda1/ does not exist (a path prefix is not a directory).

    – primuspaul
    Mar 20 at 5:31











  • There's an extra / after /dev/sda1

    – To Do
    Mar 21 at 2:28














0












0








0







First you need to unmount it (Remember to use sudo)-



sudo umount /dev/sda1



Then you need to properly mount it but before that double-check



lsblk



Make sure this is the partition you want to mount



Create a directory in /mnt/ with your favorite name say 'sda1'



sudo mkdir /mnt/sda1



Now mount the partition to the directory



mount /dev/sda1/ /mnt/sda1






share|improve this answer













First you need to unmount it (Remember to use sudo)-



sudo umount /dev/sda1



Then you need to properly mount it but before that double-check



lsblk



Make sure this is the partition you want to mount



Create a directory in /mnt/ with your favorite name say 'sda1'



sudo mkdir /mnt/sda1



Now mount the partition to the directory



mount /dev/sda1/ /mnt/sda1







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 20 at 5:25









moonLightmoonLight

31




31













  • sudo mount /dev/sda1/ /mnt/sda1 mount: /mnt/sda1: special device /dev/sda1/ does not exist (a path prefix is not a directory).

    – primuspaul
    Mar 20 at 5:31











  • There's an extra / after /dev/sda1

    – To Do
    Mar 21 at 2:28



















  • sudo mount /dev/sda1/ /mnt/sda1 mount: /mnt/sda1: special device /dev/sda1/ does not exist (a path prefix is not a directory).

    – primuspaul
    Mar 20 at 5:31











  • There's an extra / after /dev/sda1

    – To Do
    Mar 21 at 2:28

















sudo mount /dev/sda1/ /mnt/sda1 mount: /mnt/sda1: special device /dev/sda1/ does not exist (a path prefix is not a directory).

– primuspaul
Mar 20 at 5:31





sudo mount /dev/sda1/ /mnt/sda1 mount: /mnt/sda1: special device /dev/sda1/ does not exist (a path prefix is not a directory).

– primuspaul
Mar 20 at 5:31













There's an extra / after /dev/sda1

– To Do
Mar 21 at 2:28





There's an extra / after /dev/sda1

– To Do
Mar 21 at 2:28


















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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1127112%2fcant-do-anything-on-sda1-permission-denied%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

數位音樂下載

When can things happen in Etherscan, such as the picture below?

格利澤436b