LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Executing a script stored in an mounted NFS Share (https://www.linuxquestions.org/questions/linux-software-2/executing-a-script-stored-in-an-mounted-nfs-share-400572/)

Riddick 01-07-2006 11:51 AM

Executing a script stored in an mounted NFS Share
 
Dear all,
This is going to be quite a specific problem, so please bear
with me for a second.
I like to store everyone at home's things on the server which
makes it easier to back up and things don't matter when users
blow up their computers, which they do regularly.

My parents share a machine (192.168.0.21) with 2 users:
lo (uid=1000, group=users)
al (uid=1001, group=users)
The machine logs lo in automatically, and then al does a switch
user and logs himself in in screen 8 (instead of 7 where lo is)
while lo is still logged in.

Both lo and al use thunderbird, the simply unzipped version
from mozilla.com. My latest "upgrade" was to move the ~/thunderbird
directory which was locally stored into
~/.thunderbird/thunderbird which is remotely mounted.

I changed the executables to point to the right direction, and
lo's thunderbird works fine. al's thunderbird, when it's in
~/.thunderbird/thunderbird (on the server) doesn't work on the
other hand, complaining that "/bin/sh is not accessible or executable".

On the server, /etc/exports is as follows (only the interesting bits):

Code:

/home/ed/Users/LO/dotthunderbird        192.168.0.21(rw,all_squash,anonuid=1000,anongid=100,sync)

/home/ed/Users/AL/dotthunderbird        192.168.0.21(rw,all_squash,anonuid=1001,anongid=100,sync)

I would like to know why for al can't execute thunderbird
when it is on an nfs share, and lo can.

Thanks,
Riddick

trickykid 01-08-2006 08:02 AM

NFS is a network share as if the remote filesystem is local, so executing scripts and applications from it will run as if they are local to your system mounting the share.

Though in your case, I don't know why you would make your exports look like they do, there's no need for two entries like you have to the same host for different mount shares. Something like this will work just fine and you can mount to each specific subdirectory beyond the /home/ed/Users without any problems:

Code:

/home/ed/Users/        192.168.0.21(rw,all_squash,anonuid=1000,anongid=100,sync)

Riddick 01-08-2006 11:00 AM

but what about the user al that is uid=1001 and need to access and execute files as such?

Thanks,
Riddick

trickykid 01-08-2006 10:15 PM

Quote:

Originally Posted by Riddick
but what about the user al that is uid=1001 and need to access and execute files as such?

Thanks,
Riddick

Easiest setup to do, make sure the user al is on the client and server with the same UID.

Riddick 01-09-2006 04:55 AM

ahh no, but my setup is that all the files that are on the server are under one
user (ed), and the structure is:

On the server:
/home/ed/Users/AL, LO, and other Users
also:
/home/ed/Shared is the shared directory

In light of that, how can I get al to execute his script?

Thanks,
Riddick

Riddick 01-12-2006 09:37 AM

ok, the problem in running the script is when it's sotred on the nfs share.
The exact error is:

al@LO:~/.thunderbird/thunderbird> ./thunderbird
bash: ./thunderbird: /bin/bash: bad interpreter: Permission denied

this doesn't happen when the exact same folder is copied locally and the script is run.

Please help!

Riddick

Riddick 01-13-2006 06:14 PM

mounted with "exec" as an additional option and it worked.
You guys should really have got that one...


All times are GMT -5. The time now is 04:20 PM.