Have no excute permission on my hard disk

cpl

I'm new to Ubuntu. In order to mount the hard disk, I added the following line to /etc/fstab and saved it.

/dev/sda1 /home/mine/hd1 ext4 auto,exec,users,rw  0 0

output of sudo fdisk -l

Disk /dev/sda: 3.7 TiB, 4000787030016 bytes, 7814037168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 1BE4FADE-5038-4B8E-BA1A-11E38749A593

Device     Start        End    Sectors  Size Type
/dev/sda1   2048 7814035455 7814033408  3.7T Linux filesystem




Disk /dev/sdb: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 46108040-B863-4181-94EF-8DEEF7ACD4D5

Device         Start       End   Sectors  Size Type
/dev/sdb1       2048   1050623   1048576  512M EFI System
/dev/sdb2    1050624 201078783 200028160 95.4G Linux filesystem
/dev/sdb3  201078784 234440703  33361920 15.9G Linux swap

/etc/fstab:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sdb2 during installation
UUID=e4488cf9-7c51-4456-8626-bfe96ba919a8 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sdb1 during installation
UUID=3144-2FF0  /boot/efi       vfat    umask=0077      0       1
# swap was on /dev/sdb3 during installation
UUID=4189137f-17b2-484c-83a9-8ca406d68cad none            swap    sw   0       0
/dev/sda1 /home/cpl/hd1 ext4 auto,exec,users,rw  0 0

However, I find it does not work after I reboot. For example, I want to run /home/cpl/hd1/a.out and it shows

bash: /home/cpl/hd1/a.out: Permission denied

I tried the command chmod, but failed.

How can I get all permissions? (p.s. I find that if I delete the line I added to /etc/fstab and run sudo mount /dev/sda1 ~/hd1, I will get excute permission. The thing is you need run it again every time you boot.) Here are the output of sudo ls -alh ~/hd1 before and after I exectue sudo mount /dev/sda1 ~/hd1.

Before:

total 8.0K
drwxrwxr-x  2 cpl cpl 4.0K Sep  4 17:39 .
drwxr-xr-x 21 cpl cpl 4.0K Sep  5 10:22 ..

After:

total 44K
drwsr-xr-x  8 cpl cpl 4.0K Sep  5 00:46 .
drwxr-xr-x 21 cpl cpl 4.0K Sep  5 10:22 ..
drwsr-xr-x  2 cpl cpl 4.0K Sep  4 18:53 beifen
drwsr-xr-x  3 cpl cpl 4.0K Sep  4 20:37 fanqiang
drwsr-xr-x  2 cpl cpl  16K Sep  1 14:02 lost+found
drwsr-xr-x  2 cpl cpl 4.0K Sep  4 16:01 test
drwsr-xr-x  5 cpl cpl 4.0K Sep  3 20:25 .Trash-1000
drwsr-xr-x  2 cpl cpl 4.0K Sep  4 21:00 utorrent
cpl

Finally I fixed it out but forgot to record here. Actually I just made a little change to the line I had added to /etc/fstab :

/dev/sda1 /home/cpl/hd1 ext4 auto,users,exec,rw  0 0

The thing is users should be in front of exec. Worked for me.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to change permission of a drive in an external hard disk?

From Dev

How to partition my hard disk

From Dev

Problem with permissions to my hard disk

From Dev

Is something wrong with my hard disk?

From Dev

I have 4 bad sectors on my hard disk, should I be worried?

From Dev

My C drive is full, but on the same hard disk I have 2 other partitions with gigs of space

From Dev

I have 4 bad sectors on my hard disk, should I be worried?

From Dev

my hard disk works very slow

From Dev

Unable to access my desktop computer hard disk

From Dev

My hard disk does't get recognized

From Dev

Unable to mount my external hard disk

From Dev

My external hard disk got accidentally formatted

From Dev

I have a 24 Gb disk and a 1Tb Hard Disk How do I get Ubuntu to install on my 24 GB and my home dir on the 1TB

From Dev

How to give permission to user after mounting a hard disk on Centos 7?

From Dev

Unable to add or delete to internal hard disk (Not a file permission issue)

From Dev

will installing Ubuntu convert my hard disk to a dynamic disk?

From Dev

will installing Ubuntu convert my hard disk to a dynamic disk?

From Dev

Inadvertently nuked my disk permission structure - why?

From Dev

NTFS Hard disk about to die, I only have another ext4 hard disk and want to backup on it

From Dev

Renaming Admin User on my PC makes my hard disk Full

From Dev

How many sectors does a 320 GB hard disk have?

From Dev

Where is data saved if I do not have an hard disk drive?

From Dev

according to SMART hard disk is not broken, but I have errors in dmesg

From Dev

How to make a user not have write permission to all the disk files and directories?

From Dev

How to check the disk activity of my hard-drive?

From Dev

Accidentally release my hard disk.vdi from virtual machine

From Dev

Is there a way to control my hard-disk rotation speed?

From Dev

What is the python code to load dataset from my hard disk

From Dev

Does computer weight increase as I add data to my Hard disk?

Related Related

  1. 1

    How to change permission of a drive in an external hard disk?

  2. 2

    How to partition my hard disk

  3. 3

    Problem with permissions to my hard disk

  4. 4

    Is something wrong with my hard disk?

  5. 5

    I have 4 bad sectors on my hard disk, should I be worried?

  6. 6

    My C drive is full, but on the same hard disk I have 2 other partitions with gigs of space

  7. 7

    I have 4 bad sectors on my hard disk, should I be worried?

  8. 8

    my hard disk works very slow

  9. 9

    Unable to access my desktop computer hard disk

  10. 10

    My hard disk does't get recognized

  11. 11

    Unable to mount my external hard disk

  12. 12

    My external hard disk got accidentally formatted

  13. 13

    I have a 24 Gb disk and a 1Tb Hard Disk How do I get Ubuntu to install on my 24 GB and my home dir on the 1TB

  14. 14

    How to give permission to user after mounting a hard disk on Centos 7?

  15. 15

    Unable to add or delete to internal hard disk (Not a file permission issue)

  16. 16

    will installing Ubuntu convert my hard disk to a dynamic disk?

  17. 17

    will installing Ubuntu convert my hard disk to a dynamic disk?

  18. 18

    Inadvertently nuked my disk permission structure - why?

  19. 19

    NTFS Hard disk about to die, I only have another ext4 hard disk and want to backup on it

  20. 20

    Renaming Admin User on my PC makes my hard disk Full

  21. 21

    How many sectors does a 320 GB hard disk have?

  22. 22

    Where is data saved if I do not have an hard disk drive?

  23. 23

    according to SMART hard disk is not broken, but I have errors in dmesg

  24. 24

    How to make a user not have write permission to all the disk files and directories?

  25. 25

    How to check the disk activity of my hard-drive?

  26. 26

    Accidentally release my hard disk.vdi from virtual machine

  27. 27

    Is there a way to control my hard-disk rotation speed?

  28. 28

    What is the python code to load dataset from my hard disk

  29. 29

    Does computer weight increase as I add data to my Hard disk?

HotTag

Archive