Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
i used to get this error only when i ran an executable from a removable drive, i accepted this for security reasons, thats fine. now (this is a new instalation ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2006
    Posts
    85

    "permission denied" error when running from secondary hdd


    i used to get this error only when i ran an executable from a removable drive, i accepted this for security reasons, thats fine. now (this is a new instalation for a new computer later btw) when i run an executable from my INTERNAL HDD i get this error. now this bothers me. you see i keep a lot of data on my secondary since its my biggest HDD (500 gig, my main is 250 gig) so i keep a lot of code on it and i like to be able to compile and run it there, i also like to be able to link executable from there to my main hdd to alleviate space. but this permission error (which doesnt even allow ROOT to do it...wtf?) makes it so i cant run ANY executable from my secondary.

    is there anything i can do to fix this (short of recompiling the kernel)

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Post the contents of /etc/fstab file here. Post the output of these commands too :
    Code:
    sudo fdisk -l
    df -h
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Just Joined!
    Join Date
    Dec 2006
    Posts
    85
    hmm...ok it seems it does work if i mount with mount -o exec <device> but when i mount with exec in the options in /etc/fstab it doesnt work.
    outputs are:
    df:
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda1 227G 93G 123G 43% /
    tmpfs 502M 0 502M 0% /lib/init/rw
    udev 10M 116K 9.9M 2% /dev
    tmpfs 502M 0 502M 0% /dev/shm
    /dev/sdf1 991M 578M 413M 59% /media/JORDAN
    /dev/hda1 458G 432G 2.8G 100% /mnt/hdb1

    fstab:
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    proc /proc proc defaults 0 0
    /dev/sda1 / ext3 errors=remount-ro 0 1
    /dev/sda5 none swap sw 0 0
    /dev/hda1 /mnt/hdb1 ext3 rw,exec,users 0 0

    fdisk:

    Disk /dev/sda: 250.0 GB, 250059350016 bytes
    255 heads, 63 sectors/track, 30401 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x15d715d6

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 30071 241545276 83 Linux
    /dev/sda2 30072 30401 2650725 5 Extended
    /dev/sda5 30072 30401 2650693+ 82 Linux swap / Solaris

    Disk /dev/hda: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00080f72

    Device Boot Start End Blocks Id System
    /dev/hda1 1 60667 487307646 83 Linux
    /dev/hda2 60668 60801 1076355 5 Extended
    /dev/hda5 60668 60801 1076323+ 82 Linux swap / Solaris

    Disk /dev/sdf: 1040 MB, 1040187392 bytes
    1 heads, 32 sectors/track, 63488 cylinders
    Units = cylinders of 32 * 512 = 16384 bytes
    Disk identifier: 0xde57cac7

    Device Boot Start End Blocks Id System
    /dev/sdf1 * 2 63488 1015792 b W95 FAT32

    so what do i need to get this to allow executable automatically?

  4. #4
    Linux Newbie tetsujin's Avatar
    Join Date
    Oct 2008
    Posts
    117
    Take an executable on the second drive, run "chmod a+x" on it, and try running it.

    If that works, then your problem isn't with your mount options or anything but just in the files you've copied onto the drive. Maybe you had it mounted with the "noexec" flag when you copied the files to it? (Would that do it?) Or maybe you copied the files there in a way that didn't retain their permissions?

  5. #5
    Just Joined!
    Join Date
    Dec 2006
    Posts
    85
    well mounting with the -exec flag allows the executable to run. however having the exec flag in the fstab alone doesnt work.

  6. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,380
    What is the distribution and kernel version you are running? Also, what is the file system on the secondary hard drive? Personally, I have never had a problem like this.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  7. #7
    Just Joined!
    Join Date
    Dec 2006
    Posts
    85
    the secondary and primary are both ext3.

    i have also found that the /etc/mtab shows different values for the device than the fstab (mtab shows it mounted with noexec, also when i give other values they never seem to show up with mountings of the HDD)

    i dont really know why its doing this exactly

  8. #8
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,380
    Have you tried unmounting it, and then mounting it again from fstab? IE: leave the entry for the drive in /etc/fstab, reboot, unmount the drive, then remount it: mount <mnt-point-in-fstab>
    Use no options, then see what /etc/mtab shows. Also, please post your /etc/fstab and indicate which drive you are having problems with. TAL.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  9. #9
    Just Joined!
    Join Date
    Dec 2006
    Posts
    85
    well the /etc/fstab is in a previous post. the drive is /dev/hda1
    i have tried unmounting and remounting. when i mount from fstab it doesnt mount with exec options, when i mount with the -exec option it does though...

  10. #10
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,380
    Is this a 2.4 kernel? Seems so if the hdd is /dev/hda. Have you considered updating the kernel and file system drivers?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •