LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Problem mounting a drive via mount point under home (https://www.linuxquestions.org/questions/linux-newbie-8/problem-mounting-a-drive-via-mount-point-under-home-649931/)

CelticBlues 06-17-2008 12:57 PM

Problem mounting a drive via mount point under home
 
I have a secondary hard disk, /dev/sdb1, which I want to mount using a mount point which is a directory under my user home. In my fstab I have the following entry:

/dev/sdb1 /home/myhome/secondarydisk ext2 rw,suid,dev,exec,auto,user,sync 0 0

I can read/write to the drive, but when I build an app on this drive I can't execute it. The app has the following permissions:

-rwxr-xr-x

Which I thought gave me permissions to execute the app. What have I done wrong?

Thanks,

CB

jailbait 06-17-2008 01:26 PM

Check the permissions for the /home/myhome/secondarydisk directory. Make sure that it allows program execution.

--------------------
Steve Stites

CelticBlues 06-17-2008 01:30 PM

It does...
CB

Quote:

Originally Posted by jailbait (Post 3187586)
Check the permissions for the /home/myhome/secondarydisk directory. Make sure that it allows program execution.

--------------------
Steve Stites


pixellany 06-17-2008 02:36 PM

What happens when you try to run the application? eg error messages.

CelticBlues 06-17-2008 03:35 PM

I get this:

bash: /home/myhome/secondarydisk/myapp: Permission denied

The permissions of /home/myhome/secondarydisk is: drwxrwxr-x

It seems that the owner of the /home/myhome/secondarydisk directory is user 505, which is not listed in the table of users or groups.

CB

Quote:

Originally Posted by pixellany (Post 3187630)
What happens when you try to run the application? eg error messages.


michaelk 06-17-2008 03:41 PM

Quote:

/dev/sdb1 /home/myhome/secondarydisk ext2 rw,suid,dev,exec,auto,user,sync 0 0
Take a look at the mount man pages. The user option implies noexec, nosuid, and nodev which will override anything prior. The mount command without options will show how each filesystem is mounted.

jailbait 06-17-2008 03:43 PM

Quote:

Originally Posted by CelticBlues (Post 3187684)
I get this:

bash: /home/myhome/secondarydisk/myapp: Permission denied

The permissions of /home/myhome/secondarydisk is: drwxrwxr-x

It seems that the owner of the /home/myhome/secondarydisk directory is user 505, which is not listed in the table of users or groups.

CB

A mount point cannot also be used as a regular directory. Try creating a directory under /home/myhome/secondarydisk and put your programs there. In other words create something like:

/home/myhome/secondarydisk/bin/myapp

----------------------
Steve Stites

CelticBlues 06-17-2008 03:46 PM

Actually the app is not in the root directory...it is several down

something like...

/home/myhome/secondarydisk/development/projects/newproj/thisone/trunk/bin


CB

Quote:

Originally Posted by jailbait (Post 3187696)
A mount point cannot also be used as a regular directory. Try creating a directory under /home/myhome/secondarydisk and put your programs there. In other words create something like:

/home/myhome/secondarydisk/bin/myapp

----------------------
Steve Stites


CelticBlues 06-18-2008 10:30 AM

Ding Ding Ding.... We have a winner.... the user option was over riding the previous options... I removed 'user' and now it is all working like I thought it should....Thanks,

CB


Quote:

Originally Posted by michaelk (Post 3187691)
Take a look at the mount man pages. The user option implies noexec, nosuid, and nodev which will override anything prior. The mount command without options will show how each filesystem is mounted.



All times are GMT -5. The time now is 05:41 AM.