LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Cannot execute files on ext4 partition (https://www.linuxquestions.org/questions/linux-software-2/cannot-execute-files-on-ext4-partition-728878/)

Arancaytar 05-27-2009 11:55 AM

Cannot execute files on ext4 partition
 
I just migrated my /home to a separate partition for easier upgrades/backups. Unfortunately, now my ~/bin scripts (and desktop launchers) can no longer be executed.

The ls command reveals that the files are still owned by me, and the permission masks still makes them executable:

Code:

-rwxr-xr-x 1 arancaytar arancaytar    75 2009-04-19 23:36 fortune
The fstab entry shows that the partition is mounted with the exec flag:

Code:

/dev/sda9        /home        ext4        exec,user,relatime,errors=remount-ro        0        0
And yet, files aren't executable:

Code:

bash: /home/arancaytar/bin/fortune: Permission denied
In fact, the only thing that's changed is that the file-system is ext4. But I didn't find anything on Google ext4 not supporting binary execution...

Arancaytar 05-27-2009 12:07 PM

Addendum: fstab shows hat the partition SHOULD have been mounted with exec.

mount shows that (as could be guessed) it wasn't:

Code:

/dev/sda9 on /home type ext4 (rw,noexec,nosuid,nodev,relatime,errors=remount-ro)
So I guess my real question is: Why won't Ubuntu 9.04 let me mount a partition of type ext4 with the exec flag?

glacionaut 11-06-2010 02:58 PM

Hello!

I have the same problem, have you solved it? How can i mount the ext4 partition with exec option set?

Thanks,
Anton

Arancaytar 11-07-2010 03:06 AM

I'm afraid I haven't. It might be solvable, but personally I've sworn off ext4 for the time being; I'm back to ext3 exclusively.

glacionaut 11-08-2010 12:56 AM

oh, not good to hear. but thanks for the reply.
so i will also switch back to ext3!

greetings from vienna,
Anton

Nylex 11-08-2010 12:59 AM

Strange. Perhaps try looking at Ubuntu's forums, or their bug reporting pages, to see if it's known (and if not, add it).

EDDY1 11-08-2010 03:32 AM

Is your kernel atleast a 2.6.32 kernel.
I only ask ,because I have Debian 506 & Ubuntu 10.10
For Debian the only the 2.6.32 kernel was able to read into my Ubuntu files.
Ubuntu 10.10 is ext4
Debian is ext2

My only option was to change Debian kernel to 2.6.32.

cantab 11-08-2010 08:31 AM

Quote:

Originally Posted by man mount
user
Allow an ordinary user to mount the file system. The name of the mounting user is written to mtab so that he can unmount the file system again. This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line user,exec,dev,suid).

So there's your problem. I have no idea why you need the "user" option at all - that's normally employed for removable drives. But if you must use it, put exec after user.

(It should be noted than in general, when trying to figure out options and stuff for /etc/fstab, the mount manpage is a lot more informative than the fstab manpage.)

glacionaut 11-09-2010 01:08 AM

hi cantab!

that was also my first thought when i read the mount manpage.

my fstab is like this:
Code:

/dev/sda1        /media/Data        ext4        auto,user,exec,rw,async        0        0
and when i mount the disk (i am on an thinkpad t60 and the disk is in the ultrabay, so it sort of an external device) this is what i get:

Code:

$ mount
/dev/sda1 on /media/Data type ext4 (rw,nosuid,nodev)

i also tried to remove the auto and user flags in /etc/fstab:
Code:

/dev/sda1  /media/Data ext4    exec,rw,async  0  0
after mounting the disk i get this:
Code:

$ mount
/dev/sda1 on /media/Data type ext4 (rw)

i have tried many options in fstab, but nothing brings the disk to mount with the exec flag on. very strange...

has anyone else seen this behaviour?

thanks,
Anton

ariels 11-09-2010 01:42 AM

Quote:

Originally Posted by glacionaut (Post 4153292)
hi cantab!

that was also my first thought when i read the mount manpage.

my fstab is like this:
Code:

/dev/sda1        /media/Data        ext4        auto,user,exec,rw,async        0        0
and when i mount the disk (i am on an thinkpad t60 and the disk is in the ultrabay, so it sort of an external device) this is what i get:

Code:

$ mount
/dev/sda1 on /media/Data type ext4 (rw,nosuid,nodev)


There is no displayed "exec" flag when running "mount", only "noexec". If it's not there, you should be able to execute from it.

i92guboj 11-09-2010 03:19 AM

I don't know what debian/*buntu do with their kernels, however if you really really want to go the ext4 route you should be using the latest stable kernel. ext4 is a newly born animal, and there's quite a lot of difference and a lot less bugs on newer kernels. Pick 2.6.36 from kernel.org and use that instead. If you still have problems then it will be time to look deeper.

prplmnky 03-11-2013 10:46 AM

Quote:

So there's your problem. I have no idea why you need the "user" option at all - that's normally employed for removable drives. But if you must use it, put exec after user.
Thanks, cantab. I had a similar problem with executing on an external ext4 drive, and your solution worked.


All times are GMT -5. The time now is 10:21 AM.